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

BF/PR453: revise to remove obsolete check for undefined

Checking for `undefined` is already covered by new condition.
This commit is contained in:
Sijia Zhao 2021-08-06 22:54:42 +01:00
parent d72f23e9fd
commit 2e0fe28210

View File

@ -534,12 +534,12 @@ export class PsychoJS
// return from fullscreen if we were there:
this._window.closeFullScreen();
// redirect if redirection URLs have been provided:
if (isCompleted && typeof self._completionUrl !== "undefined" && self._completionUrl)
// redirect if redirection URLs have been provided (and not empty):
if (isCompleted && self._completionUrl)
{
window.location = self._completionUrl;
}
else if (!isCompleted && typeof self._cancellationUrl !== "undefined" && self._cancellationUrl)
else if (!isCompleted && self._cancellationUrl)
{
window.location = self._cancellationUrl;
}