Skip to content

Commit 0612e9b

Browse files
committed
fix(chart): throw error if no worksheet relation found
1 parent ea8d99d commit 0612e9b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/shapes/chart.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,12 @@ export class Chart extends Shape implements IChart {
235235
this.wbEmbeddingsPath,
236236
);
237237

238+
if (!relationTargets[0]) {
239+
throw new Error(
240+
`Could not find a related worksheet pointing to ${this.wbEmbeddingsPath}@${targetRelFile}`,
241+
);
242+
}
243+
238244
return relationTargets[0].filenameBase;
239245
}
240246

0 commit comments

Comments
 (0)