Changes in preparation for Coffeescript 2. #829

This commit is contained in:
ccd0 2019-07-19 10:26:29 -07:00
parent d2c2c017f1
commit 10f5f60b7f
2 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -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]