Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with permanent notifications #270

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

harisali45
Copy link

@harisali45 harisali45 commented Mar 21, 2017

In the notifications screen, to make a notification stick permanently, we enter 0 for timeout. But after entering 0 for timeout, the notification is shown and then removed immediately. This is because a string value is assigned to $scope.options.timeOut and timeouts are created for notifications when timeout value is truthy. Line#441 in angular-toastr.tpls.js :

scope.init = function() { 
         if (scope.options.timeOut) { 
          timeout = createTimeout(scope.options.timeOut);
        }

The value for timeOut and extendedTimeOut should be numeric. The number 0 is not truthy, but the string value "0" is truthy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant