-
Notifications
You must be signed in to change notification settings - Fork 113
feat(mc): #2017 Add blocking to snippets.js #2992
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, just 2 nits
@@ -22,7 +22,7 @@ class SnippetsMap extends Map { | |||
return this._dbTransaction(db => db.put(value, key)); | |||
} | |||
|
|||
delete(key, value) { | |||
delete(key, valuatoe) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this is a typo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, there isn't a value for delete anyway...
} | ||
let blockList = this.blockList; | ||
if (!blockList.includes(id)) { | ||
blockList = [id].concat(blockList); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you not able to just push id onto blockList?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I could, I was in no-mutate redux mode I guess
This adds blocking functionality for snippets that can be used by the payload JS