diff options
author | Aleš Smodiš <aless@guru.si> | 2015-09-18 16:41:12 +0200 |
---|---|---|
committer | Aleš Smodiš <aless@guru.si> | 2015-09-18 16:41:12 +0200 |
commit | da92df9761b52f6d24d2241080121cc5bef5e932 (patch) | |
tree | aa10f5f9f71499e4b255ce5058008bde694bb77b /js/codeq | |
parent | 3df482a0fcca2f11cce51fc072e6a4dbc861c2a4 (diff) |
Don't crash loading a prolog problem, if the problem has no plan set.
Diffstat (limited to 'js/codeq')
-rw-r--r-- | js/codeq/prolog.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/js/codeq/prolog.js b/js/codeq/prolog.js index 4eed354..be4791a 100644 --- a/js/codeq/prolog.js +++ b/js/codeq/prolog.js @@ -371,7 +371,7 @@ editor.setValue(info.solution); $('#title').text(problem.slug); jqDescription.html(problem.description); - $('#btn_code_plan').prop('disabled', problem.plan.length == 0); + $('#btn_code_plan').prop('disabled', (problem.plan || '').length == 0); editor.on('change', function (instance, changeObj) { var doc = editor.getDoc(), |