mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-21 14:09:34 +01:00
fix: don't mutate the notebook object
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user