Permalink
Browse files

fix remove

  • Loading branch information...
1 parent aac15c7 commit 6ed5e41e8c7b4095233e299a23609b57f5e72635 Andrei Neculau committed Dec 7, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 index.coffee
View
@@ -81,8 +81,10 @@ define () ->
exports.remove = (obj, pointer) ->
try
exports.setCallback obj, pointer, (obj, [type, key]) ->
- obj.splice key, 1 if obj instanceof Array
- delete obj[key]
+ if obj instanceof Array
+ obj.splice key, 1
+ else
+ delete obj[key]
catch e
exports

0 comments on commit 6ed5e41

Please sign in to comment.