fix: don't mutate the notebook object

This commit is contained in:
thecodrr
2020-02-22 17:59:48 +05:00
parent f8b5e6039e
commit 4a96a0aae2
2 changed files with 10 additions and 2 deletions

View File

@@ -25,8 +25,10 @@ export default class Notebook {
}
toggle(prop) {
this.notebook[prop] = !this.notebook[prop];
return this.notebooks.add(this.notebook);
return this.notebooks.add({
id: this.notebook.id,
[prop]: !this.notebook[prop]
});
}
pin() {