]> _ Git - fluidbook-toolbox.git/commitdiff
wait #5459
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 15 Sep 2022 16:44:07 +0000 (18:44 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 15 Sep 2022 16:44:07 +0000 (18:44 +0200)
app/Util/FluidbookLinks.php
public/packages/fluidbook/toolbox/js/linkeditor.js

index 1994a34c13444aafd3c2c928c195a218803c91a9..627c453d0e62ac047635a817c10ae03ed2373a32 100644 (file)
@@ -317,7 +317,7 @@ class FluidbookLinks
 
         $crypted = [13, 14, 35];
 
-        if (!in_array($link->type, $crypted)) {
+        if (!isset($link->type) || !in_array($link->type, $crypted)) {
             return $link;
         }
 
index 713db790bfe69b67d244def25181f524d3750c03..2795971f2a413852d1ace96e4976612a6ae15994 100644 (file)
@@ -178,10 +178,11 @@ function saveLinks(message) {
             new Noty({
                 type: "success", text: TRANSLATIONS.success_save,
             }).show();
-            unsavedChanges = false;
-            runningAutomaticSaveTimeout=false;
             clearTimeout(automaticSaveTimeout);
+            unsavedChanges = false;
+            runningAutomaticSaveTimeout = false;
         }, error: function (jqXHR, status, error) {
+            hasChanged();
             new Noty({
                 type: "error", text: TRANSLATIONS.error_save + ' : ' + error,
             }).show();