From 717aa3ca4f7c25075aee2d3ccc5a09caf81d19a7 Mon Sep 17 00:00:00 2001 From: Sotiri Bakagiannis Date: Tue, 29 Sep 2020 20:50:54 +0100 Subject: [PATCH] core/GUI: make sure _setRequiredKeys exists before accessing its size --- js/core/GUI.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/core/GUI.js b/js/core/GUI.js index 555a2cf..a99290b 100644 --- a/js/core/GUI.js +++ b/js/core/GUI.js @@ -624,7 +624,7 @@ export class GUI */ _updateOkButtonStatus() { - if (this._psychoJS.getEnvironment() === ExperimentHandler.Environment.LOCAL || (this._allResourcesDownloaded && this._setRequiredKeys.size >= this._requiredKeys.length)) + if (this._psychoJS.getEnvironment() === ExperimentHandler.Environment.LOCAL || (this._allResourcesDownloaded && this._setRequiredKeys && this._setRequiredKeys.size >= this._requiredKeys.length)) { $("#buttonOk").button("option", "disabled", false).focus(); }