This repository was archived by the owner on Sep 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
toast: element.remove() does not return promise #10379
Copy link
Copy link
Closed
Labels
P3: importantImportant issues that really should be fixed when possible.Important issues that really should be fixed when possible.has: Pull RequestA PR has been created to address this issueA PR has been created to address this issueresolution: fixedtype: bug
Milestone
Description
Actual Behavior:
What is the issue? *
toast throws error when hiding if rapidly executing show
the problem is the one-liner that handles that
return ((options.$destroy == true) ? element.remove() : $animate.leave(element)).then(...
What is the expected behavior?
do not throw the error
CodePen (or steps to reproduce the issue): *
CodePen Demo which shows your issue:
http://codepen.io/anon/pen/apaZMeDetails:
Angular Versions: *
Angular Version:
1.6.1Angular Material Version:
1.1.1 and 1.1.3
Additional Information:
Browser Type: *
ChromeBrowser Version: *
55.0.2883.95OS: *
OSXStack Traces:
TypeError: (intermediate value)(intermediate value)(intermediate value).then is not a function
at Object.onRemove (https://ajax.googleapis.com/ajax/libs/angular_material/1.1.1/angular-material.js:20861:10)
at https://ajax.googleapis.com/ajax/libs/angular_material/1.1.1/angular-material.js:3524:46
at u (https://ajax.googleapis.com/ajax/libs/angularjs/1.6.1/angular.min.js:135:446)
at hideElement (https://ajax.googleapis.com/ajax/libs/angular_material/1.1.1/angular-material.js:3521:18)
at Object.transitionOutAndRemove [as remove] (https://ajax.googleapis.com/ajax/libs/angular_material/1.1.1/angular-material.js:3334:20)
at Object.destroy (https://ajax.googleapis.com/ajax/libs/angular_material/1.1.1/angular-material.js:3268:34)
at Object.destroyInterimElement [as destroy] (https://ajax.googleapis.com/ajax/libs/angular_material/1.1.1/angular-material.js:3089:40)
at https://ajax.googleapis.com/ajax/libs/angular_material/1.1.1/angular-material.js:20427:18
at b.$broadcast (https://ajax.googleapis.com/ajax/libs/angularjs/1.6.1/angular.min.js:150:183)
at b.$destroy (https://ajax.googleapis.com/ajax/libs/angularjs/1.6.1/angular.min.js:146:180) Possibly unhandled rejection: {}
(anonymous) @ VM643 console_runner-5710c30….js:1
(anonymous) @ VM1359 angular.min.js:122
(anonymous) @ VM1359 angular.min.js:94
g @ VM1359 angular.min.js:133
f @ VM1359 angular.min.js:47
(anonymous) @ VM1359 angular.min.js:50
Splaktar
Metadata
Metadata
Assignees
Labels
P3: importantImportant issues that really should be fixed when possible.Important issues that really should be fixed when possible.has: Pull RequestA PR has been created to address this issueA PR has been created to address this issueresolution: fixedtype: bug