Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ONLYOFFICE/onlyoffice-nextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2022-08-05 13:33:34 +0300
committerSergey Linnik <sergey.linnik@onlyoffice.com>2022-09-07 10:55:19 +0300
commit61121e80258fd6534f90114c22256c9c3814b48d (patch)
tree2b364d47f64503ba63407ca9f4498f25db0dd82a
parent8cf64d04dbd7fa67a26d24df3c9a3ce82ddd1017 (diff)
Redirect before trying to access other config values
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r--js/editor.js10
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;