diff options
author | Julius Härtl <jus@bitgrid.net> | 2022-08-05 13:33:34 +0300 |
---|---|---|
committer | Sergey Linnik <sergey.linnik@onlyoffice.com> | 2022-09-07 10:55:19 +0300 |
commit | 61121e80258fd6534f90114c22256c9c3814b48d (patch) | |
tree | 2b364d47f64503ba63407ca9f4498f25db0dd82a | |
parent | 8cf64d04dbd7fa67a26d24df3c9a3ce82ddd1017 (diff) |
Redirect before trying to access other config values
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r-- | js/editor.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/js/editor.js b/js/editor.js index e5838e2..fdb5a2d 100644 --- a/js/editor.js +++ b/js/editor.js @@ -107,6 +107,11 @@ url: configUrl, success: function onSuccess(config) { if (config) { + if (config.redirectUrl) { + location.href = config.redirectUrl; + return; + } + if (config.error != null) { OCA.Onlyoffice.showMessage(config.error, "error", {timeout: -1}); return; @@ -118,11 +123,6 @@ return; } - if (config.redirectUrl) { - location.href = config.redirectUrl; - return; - } - var docIsChanged = null; var docIsChangedTimeout = null; |