summaryrefslogtreecommitdiff
path: root/js/SingleUseDialog.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-24 21:56:52 +0300
committerAndrew Dolgov <[email protected]>2021-02-24 21:56:52 +0300
commit93940d2a9f80d9e1dac49b5eb7db23230d31c5f6 (patch)
tree71016661f6017918d0934eb462bd9552018d557a /js/SingleUseDialog.js
parent8b022c2bfb356d7dddaf334bc931d6dec77086fb (diff)
parent1adacd057230aea4ede29dab510385bf01cf99a3 (diff)
Merge branch 'master' of git.fakecake.org:fox/tt-rss into weblate-integration
Diffstat (limited to 'js/SingleUseDialog.js')
-rw-r--r--js/SingleUseDialog.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/js/SingleUseDialog.js b/js/SingleUseDialog.js
index 944f24c6f..2de6f83ff 100644
--- a/js/SingleUseDialog.js
+++ b/js/SingleUseDialog.js
@@ -1,6 +1,17 @@
+/* eslint-disable prefer-rest-params */
/* global dijit, define */
define(["dojo/_base/declare", "dijit/Dialog"], function (declare) {
return declare("fox.SingleUseDialog", dijit.Dialog, {
+ create: function(params) {
+ const extant = dijit.byId(params.id);
+
+ if (extant) {
+ console.warn('SingleUseDialog: destroying existing widget:', params.id, '=', extant)
+ extant.destroyRecursive();
+ }
+
+ return this.inherited(arguments);
+ },
onHide: function() {
this.destroyRecursive();
}