diff options
Diffstat (limited to 'src/client/util')
| -rw-r--r-- | src/client/util/DocumentManager.ts | 4 | ||||
| -rw-r--r-- | src/client/util/SerializationHelper.ts | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts index cca92816f..ac3721436 100644 --- a/src/client/util/DocumentManager.ts +++ b/src/client/util/DocumentManager.ts @@ -310,8 +310,8 @@ export class DocumentManager { focused = focused || nextFocus !== undefined; // keep track of whether focusing on a view needed to actually change anything // eslint-disable-next-line no-await-in-loop const { childDocView, viewSpec } = await iterator(docView); - if (!childDocView) return { viewSpec: options.anchorDoc ?? viewSpec ?? docView.Document, docView, contextView, focused }; - contextView = options.anchorDoc?.layout_unrendered && !childDocView.Document.layout_unrendered ? childDocView : docView; + if (!childDocView) return { viewSpec: viewSpec ?? docView.Document, docView, contextView, focused }; + contextView = !childDocView.Document.layout_unrendered ? childDocView : docView; docView = childDocView; } return undefined; diff --git a/src/client/util/SerializationHelper.ts b/src/client/util/SerializationHelper.ts index fa1a911f7..d9d22437c 100644 --- a/src/client/util/SerializationHelper.ts +++ b/src/client/util/SerializationHelper.ts @@ -65,7 +65,7 @@ export namespace SerializationHelper { } } -export function Deserializable(className: string, afterDeserialize?: (obj: any) => void | Promise<any>, constructorArgs?: [string]): (constructor: { new (...args: any[]): any }) => void { +export function Deserializable(classNameForSerializer: string, afterDeserialize?: (obj: any) => void | Promise<any>, constructorArgs?: [string]): (constructor: { new (...args: any[]): any }) => void { function addToMap(className: string, Ctor: { new (...args: any[]): any }) { const schema = getDefaultModelSchema(Ctor) as any; if (schema.targetClass !== Ctor || constructorArgs) { @@ -78,7 +78,7 @@ export function Deserializable(className: string, afterDeserialize?: (obj: any) throw new Error(`Name ${className} has already been registered as deserializable`); } } - return (ctor: { new (...args: any[]): any }) => addToMap(className, ctor); + return (ctor: { new (...args: any[]): any }) => addToMap(classNameForSerializer, ctor); } export function autoObject(): PropSchema { |
