From cf160bc2756e692ff0edcbc83ff1dbd2ca15796e Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Tue, 22 Dec 2020 15:23:54 -0600 Subject: [PATCH] Don't show the warning message when compiler is disabled (by URL parameter) --- src/lib/tw-editor-warning-hoc.jsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/lib/tw-editor-warning-hoc.jsx b/src/lib/tw-editor-warning-hoc.jsx index 0ef9cbd81..9a96b5a28 100644 --- a/src/lib/tw-editor-warning-hoc.jsx +++ b/src/lib/tw-editor-warning-hoc.jsx @@ -16,10 +16,13 @@ const TWEditorWarningHOC = function (WrappedComponent) { } enableWarpTimerIfInEditor () { if (!this.props.isPlayerOnly) { - this.props.onShowWarning(); - this.props.vm.setCompilerOptions({ - warpTimer: true - }); + // If compiler is already disabled, don't show the warning or change warp timer. + if (this.props.compilerOptions.enabled) { + this.props.onShowWarning(); + this.props.vm.setCompilerOptions({ + warpTimer: true + }); + } this.disabled = true; } }