فهرست منبع

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
       // don't save on initialisation, Angular passes oldRootDoc_id as
       // undefined in this case.
       // undefined in this case.
-      if (typeof oldRootDoc_id === 'undefined') {
+      if (
+        typeof rootDoc_id === 'undefined' &&
+        typeof oldRootDoc_id === 'undefined'
+      ) {
         return
         return
       }
       }
       // otherwise only save changes, null values are allowed
       // otherwise only save changes, null values are allowed