Skip to content

Commit

Permalink
Changes in preparation for Coffeescript 2. #829
Browse files Browse the repository at this point in the history
  • Loading branch information
ccd0 committed Jul 19, 2019
1 parent d2c2c01 commit 10f5f60
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/classes/Callbacks.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Callbacks
@keys.push name unless @[name]
@[name] = cb

execute: (node, keys=@keys, force) ->
execute: (node, keys=@keys, force=false) ->
return if node.callbacksExecuted and !force
node.callbacksExecuted = true
for name in keys
Expand Down
7 changes: 6 additions & 1 deletion src/classes/Post.Clone.coffee
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
Post.Clone = class extends Post
isClone: true

constructor: (@origin, @context, contractThumb) ->
constructor: ->
that = Object.create(Post.Clone.prototype)
that.construct arguments...
return that

construct: (@origin, @context, contractThumb) ->
for key in ['ID', 'postID', 'threadID', 'boardID', 'siteID', 'fullID', 'board', 'thread', 'info', 'quotes', 'isReply']
# Copy or point to the origin's key value.
@[key] = @origin[key]
Expand Down

0 comments on commit 10f5f60

Please sign in to comment.