Don’t assume presence of unsubscribe method in SpacePen callRemoveHooks

This commit is contained in:
Nathan Sobo 2014-11-25 10:01:27 -07:00
parent 1c16738969
commit a7c3c15885

View File

@ -12,7 +12,7 @@ jQuery.cleanData = (elements) ->
SpacePenCallRemoveHooks = SpacePen.callRemoveHooks
SpacePen.callRemoveHooks = (element) ->
view.unsubscribe() for view in SpacePen.viewsForElement(element)
view.unsubscribe?() for view in SpacePen.viewsForElement(element)
SpacePenCallRemoveHooks(element)
NativeEventNames = new Set