Skip to content
Permalink
Browse files

Small improvement for omit new

  • Loading branch information...
koenbok committed Aug 24, 2014
1 parent e61b373 commit 06a4df990c5a6ed144fc444272701cba07446ca8
Showing with 2 additions and 7 deletions.
  1. +2 −7 framer/Extras/OmitNew.coffee
@@ -1,12 +1,7 @@
exports.enable = (module=window) ->

ClassWrapper = (Klass)->
CreateWrapper = (args...) ->
if @ is window
return new Klass args...
else
@prototype = new Klass args...
return CreateWrapper
ClassWrapper = (Klass) -> (args...) ->
@prototype = new Klass(args...)

module.Frame = ClassWrapper(Framer.Frame)
module.Layer = ClassWrapper(Framer.Layer)

0 comments on commit 06a4df9

Please sign in to comment.
You can’t perform that action at this time.