From cbcfecdbcc8588e0a00a2bf67d2735ceda7b3557 Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Tue, 21 Jul 2020 12:59:02 +0200 Subject: [PATCH] Fixed jQuery issue related to modals --- shared/js/proto.ts | 2 ++ shared/js/ui/elements/Modal.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/shared/js/proto.ts b/shared/js/proto.ts index b1439a26..dbfcc69a 100644 --- a/shared/js/proto.ts +++ b/shared/js/proto.ts @@ -2,6 +2,8 @@ /* setup jsrenderer */ (window as any).$ = require("jquery"); +(window as any).jQuery = $; + import * as jsrenderInit from "jsrender"; const jsrender = jsrenderInit($); diff --git a/shared/js/ui/elements/Modal.ts b/shared/js/ui/elements/Modal.ts index 79574e67..9d3e1e1a 100644 --- a/shared/js/ui/elements/Modal.ts +++ b/shared/js/ui/elements/Modal.ts @@ -19,7 +19,7 @@ export const ModalFunctions = { if(typeof(val) === "function") val = val(); - if(val instanceof jQuery) + if(val instanceof $) return val as JQuery; if(Array.isArray(val)) {