Skip to content

Commit

Permalink
change method to get tag item
Browse files Browse the repository at this point in the history
  • Loading branch information
jgreywolf committed Nov 17, 2023
1 parent ce6eb7f commit 5a3491b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/office/src/lib/client/clientApi/PowerPointService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit 5a3491b

Please sign in to comment.