Browse Source
Merge pull request #6833 from euangoddard/master
[Modal] Tears down mutation observer on modal destruction
pull/7005/head
Jack Lukic
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
0 deletions
-
src/definitions/modules/modal.js
|
|
@ -138,6 +138,9 @@ $.fn.modal = function(parameters) { |
|
|
|
}, |
|
|
|
|
|
|
|
destroy: function() { |
|
|
|
if (observer) { |
|
|
|
observer.disconnect(); |
|
|
|
} |
|
|
|
module.verbose('Destroying previous modal'); |
|
|
|
$module |
|
|
|
.removeData(moduleNamespace) |
|
|
|