From 5a3491b9b832f9a1d9e148fb6d8b77b598caf532 Mon Sep 17 00:00:00 2001 From: Justin Greywolf Date: Fri, 17 Nov 2023 06:42:01 -0800 Subject: [PATCH] change method to get tag item --- .../office/src/lib/client/clientApi/PowerPointService.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/office/src/lib/client/clientApi/PowerPointService.ts b/packages/office/src/lib/client/clientApi/PowerPointService.ts index 4f740da..aa4e33a 100644 --- a/packages/office/src/lib/client/clientApi/PowerPointService.ts +++ b/packages/office/src/lib/client/clientApi/PowerPointService.ts @@ -49,10 +49,13 @@ export class PowerPointService extends OfficeService { for (let shapeIndex = 0; shapeIndex < shapes.items.length; shapeIndex++) { const shape = shapes.items[shapeIndex]; - const tag = shape.tags.getItemOrNullObject(C.TokenSettingName); - if (!tag.isNullObject) { + + try{ + const tag = shape.tags.getItem(C.TokenSettingName); shape.delete(); await this.replaceExistingDiagram(tag.value); + } catch (error) { + throw new RefreshError(`Error encountered while updating diagram:`, error as Error); } } }