Skip to content

Commit

Permalink
Assign noop correctly to allow switch to be properly destroyed
Browse files Browse the repository at this point in the history
$destroy event on the uiSwitch would cause a 'undefined is not a function'
exception because of this error in a noop attribution when not using $drag.
  • Loading branch information
mbenadda committed May 18, 2015
1 parent d939ab1 commit a78ab20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/components/switch.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@

elem.on('click tap', clickCb);

var unbind = angular.noop();
var unbind = angular.noop;

if ($drag) {
unbind = $drag.bind(handle, {
Expand Down

0 comments on commit a78ab20

Please sign in to comment.