Skip to content

Commit

Permalink
Bug fix for concurrent triggers.
Browse files Browse the repository at this point in the history
  • Loading branch information
matowens committed Jul 21, 2015
1 parent c7ef519 commit b21d8cc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/ng-notify.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/ng-notify.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion src/scripts/ng-notify.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,12 +277,15 @@
if (opacity <= OPACITY_MIN || OPACITY_MAX <= opacity) {

$interval.cancel(notifyInterval);
notifyInterval = false;

callback();
}
};

notifyInterval = $interval(func, FADE_INTERVAL);
if (!notifyInterval) {
notifyInterval = $interval(func, FADE_INTERVAL);
}
};

/**
Expand Down Expand Up @@ -350,6 +353,8 @@
}

$interval.cancel(notifyInterval);
notifyInterval = false;

$timeout.cancel(notifyTimeout);

var userOpts = {};
Expand Down

0 comments on commit b21d8cc

Please sign in to comment.