Skip to content

Commit

Permalink
Check if parsed symbol is string or object
Browse files Browse the repository at this point in the history
  • Loading branch information
abigailalexander committed Dec 10, 2024
1 parent 301890c commit 009ccbf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ui/widgets/EmbeddedDisplay/bobParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ function bobParseResizing(jsonProp: ElementCompact): string {
function bobParseSymbols(jsonProp: ElementCompact): string[] {
const symbols: string[] = [];
Object.values(jsonProp["symbol"]).forEach((item: any) => {
symbols.push(item);
// For a single symbol, we are passed a string. For multiple symbols
// we are passed an object, so we need to return string from it
symbols.push(typeof item === "string" ? item : item._text);
});
return symbols;
}
Expand Down

0 comments on commit 009ccbf

Please sign in to comment.