Skip to content

Commit

Permalink
fix: duplicate call on injectPostInspector
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack-Works committed Aug 6, 2019
1 parent 57b8120 commit bd3b8c7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/social-network/ui.ts
Expand Up @@ -176,13 +176,11 @@ function hookUIPostMap(ui: SocialNetworkUI) {
ui.posts.set = function(key, value) {
const undo1 = ui.injectPostInspector(value, key)
const undo2 = ui.injectCommentBox(value, key)
const undo3 = ui.injectPostInspector(value, key)
const undo4 = ui.injectPostComments(value, key)
const undo3 = ui.injectPostComments(value, key)
undoMap.set(key, () => {
undo1()
undo2()
undo3()
undo4()
})
Reflect.apply(setter, this, [key, value])
return this
Expand Down

0 comments on commit bd3b8c7

Please sign in to comment.