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

Ensure setRootDoc settings persist

GitOrigin-RevId: 76b7633719b4193dbd70ada98f2889730803b583
This commit is contained in:
Timothée Alby 2020-04-14 14:09:11 +02:00 committed by Copybot
parent ffe46658f6
commit dba294377c

View file

@ -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