fix creating relative position from json when type name is the empty string

This commit is contained in:
Kevin Jahns 2024-06-17 15:12:31 +02:00
parent a47a48b891
commit d4dac558c0

View File

@ -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 {
/**