From b86a9d704c532d336cc92b143f943c03a99086ec Mon Sep 17 00:00:00 2001 From: Peter Cottle Date: Sat, 30 Mar 2024 18:18:39 -0400 Subject: [PATCH] Resolves #1134 -- show solution on gist levels --- src/js/level/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/js/level/index.js b/src/js/level/index.js index e27d8f050..17fd65b52 100644 --- a/src/js/level/index.js +++ b/src/js/level/index.js @@ -271,7 +271,7 @@ var Level = Sandbox.extend({ ); log.showLevelSolution(this.getEnglishName()); }.bind(this); - + var commandStr = command.get('rawStr'); if (!this.testOptionOnString(commandStr, 'noReset')) { toIssue = 'reset --forSolution; ' + toIssue; @@ -282,7 +282,9 @@ var Level = Sandbox.extend({ return; } - if(!LevelStore.isLevelSolved(this.level.id)){ + // if the level doesn't have an ID, its a GIST import and + // we don't need to worry about the solved map regardless + if(this.level.id && !LevelStore.isLevelSolved(this.level.id)){ // allow them for force the solution var confirmDefer = Q.defer(); var dialog = intl.getDialog(require('../dialogs/confirmShowSolution'))[0];