From d4dac558c036f34000fd565b7961ed27e6f8f352 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Mon, 17 Jun 2024 15:12:31 +0200 Subject: [PATCH] fix creating relative position from json when type name is the empty string --- src/utils/RelativePosition.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/RelativePosition.js b/src/utils/RelativePosition.js index 744dff37..214fc6f0 100644 --- a/src/utils/RelativePosition.js +++ b/src/utils/RelativePosition.js @@ -102,7 +102,7 @@ export const relativePositionToJSON = rpos => { * * @function */ -export const createRelativePositionFromJSON = json => new RelativePosition(json.type == null ? null : createID(json.type.client, json.type.clock), json.tname || null, json.item == null ? null : createID(json.item.client, json.item.clock), json.assoc == null ? 0 : json.assoc) +export const createRelativePositionFromJSON = json => new RelativePosition(json.type == null ? null : createID(json.type.client, json.type.clock), json.tname ?? null, json.item == null ? null : createID(json.item.client, json.item.clock), json.assoc == null ? 0 : json.assoc) export class AbsolutePosition { /**