Преглед на файлове

Merge pull request #2736 from overleaf/cmg-ns-set-root-doc

Ensure setRootDoc settings persist

GitOrigin-RevId: 76b7633719b4193dbd70ada98f2889730803b583
Timothée Alby преди 6 години
родител
ревизия
dba294377c
променени са 1 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 4 1
      services/web/frontend/js/ide/settings/controllers/SettingsController.js

+ 4 - 1
services/web/frontend/js/ide/settings/controllers/SettingsController.js

@@ -198,7 +198,10 @@ define(['../../../base'], App =>
       }
       // don't save on initialisation, Angular passes oldRootDoc_id as
       // undefined in this case.
-      if (typeof oldRootDoc_id === 'undefined') {
+      if (
+        typeof rootDoc_id === 'undefined' &&
+        typeof oldRootDoc_id === 'undefined'
+      ) {
         return
       }
       // otherwise only save changes, null values are allowed