1
0
mirror of https://github.com/psychopy/psychojs.git synced 2025-05-11 16:18:10 +00:00

Merge pull request #194 from thewhodidthis/bf#193--gui

core/GUI: make sure _setRequiredKeys exists before accessing its size
This commit is contained in:
Alain Pitiot 2020-10-09 10:07:08 +02:00 committed by GitHub
commit 987ef20629
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();
}