Initialize PQueue.UI namespace defensively
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
const setStatusMessage = (window.PQueue && window.PQueue.setStatusMessage) || window.setStatusMessage;
|
||||
const copyText = (window.PQueue && window.PQueue.copyText) || window.copyText;
|
||||
|
||||
const UI = window.PQueue?.UI || {};
|
||||
const UI = window.PQueue?.UI || (window.PQueue = (window.PQueue || {}), window.PQueue.UI = {}, window.PQueue.UI);
|
||||
|
||||
UI.el = function el(tag, attrs = {}, children = []) {
|
||||
const el = document.createElement(tag);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
const UI = (window.PQueue && window.PQueue.UI) || window.UI;
|
||||
const UI = (window.PQueue && window.PQueue.UI) || (window.PQueue = (window.PQueue || {}), window.PQueue.UI = {}, window.PQueue.UI);
|
||||
|
||||
UI.ensureGallery = function ensureGallery() {
|
||||
if (UI.galleryOverlay) return;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"use strict";
|
||||
|
||||
const state = (window.PQueue && window.PQueue.state) || {};
|
||||
const UI = (window.PQueue && window.PQueue.UI) || window.UI;
|
||||
const UI = (window.PQueue && window.PQueue.UI) || (window.PQueue = (window.PQueue || {}), window.PQueue.UI = {}, window.PQueue.UI);
|
||||
const Format = (window.PQueue && window.PQueue.Format) || window.Format;
|
||||
const Events = (window.PQueue && window.PQueue.Events) || window.Events;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
const state = (window.PQueue && window.PQueue.state) || {};
|
||||
const API = (window.PQueue && window.PQueue.API) || window.API;
|
||||
const UI = (window.PQueue && window.PQueue.UI) || window.UI;
|
||||
const UI = (window.PQueue && window.PQueue.UI) || (window.PQueue = (window.PQueue || {}), window.PQueue.UI = {}, window.PQueue.UI);
|
||||
const Format = (window.PQueue && window.PQueue.Format) || window.Format;
|
||||
const setStatusMessage = (window.PQueue && window.PQueue.setStatusMessage) || window.setStatusMessage;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"use strict";
|
||||
|
||||
const state = (window.PQueue && window.PQueue.state) || {};
|
||||
const UI = (window.PQueue && window.PQueue.UI) || window.UI;
|
||||
const UI = (window.PQueue && window.PQueue.UI) || (window.PQueue = (window.PQueue || {}), window.PQueue.UI = {}, window.PQueue.UI);
|
||||
const Events = (window.PQueue && window.PQueue.Events) || window.Events;
|
||||
const Format = (window.PQueue && window.PQueue.Format) || window.Format;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"use strict";
|
||||
|
||||
const state = (window.PQueue && window.PQueue.state) || {};
|
||||
const UI = (window.PQueue && window.PQueue.UI) || window.UI;
|
||||
const UI = (window.PQueue && window.PQueue.UI) || (window.PQueue = (window.PQueue || {}), window.PQueue.UI = {}, window.PQueue.UI);
|
||||
const Events = (window.PQueue && window.PQueue.Events) || window.Events;
|
||||
|
||||
UI.renderToolbar = function renderToolbar() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
const UI = (window.PQueue && window.PQueue.UI) || window.UI;
|
||||
const UI = (window.PQueue && window.PQueue.UI) || (window.PQueue = (window.PQueue || {}), window.PQueue.UI = {}, window.PQueue.UI);
|
||||
const copyText = (window.PQueue && window.PQueue.copyText) || window.copyText;
|
||||
|
||||
UI.ensureWorkflowModal = function ensureWorkflowModal() {
|
||||
|
||||
Reference in New Issue
Block a user