Skip to content

Comments should not be removed #143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 30, 2019
Merged

Comments should not be removed #143

merged 2 commits into from
Sep 30, 2019

Conversation

cherifGsoul
Copy link
Member

Fix #138

This keeps comments with their methods and classes:
Transforms:

// Model subtask
const Subtask = DefineMap.extend("Subtask",{
    // parentTodo should not be serialized
    parentTodo: {serialize: false, type: "any"},
    // a save utility that actually saves the parent todo
    save(){
        this.parentTodo.save();
    }
});

to:

// Model subtask
class Subtask extends ObservableObject {
    static get props() {
        return {
            // parentTodo should not be serialized
            parentTodo: {enumerable: false, type: type.Any}
        };
    }

    // a save utility that actually saves the parent todo
    save() {
        this.parentTodo.save();
    }

    static get propertyDefaults() {
        return DeepObservable;
    }
};

@cherifGsoul cherifGsoul changed the title Comments should ne be removed Comments should not be removed Sep 30, 2019
@phillipskevin
Copy link
Contributor

Do comments inside functions (and getters) already work?

@cherifGsoul cherifGsoul merged commit d904844 into master Sep 30, 2019
@cherifGsoul cherifGsoul deleted the fix-comments-removed branch September 30, 2019 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some comments are removed
2 participants