Skip to content

Commit

Permalink
parse_hotspot_config.ts DOM text reinterpreted as HTML (google#4748)
Browse files Browse the repository at this point in the history
* Update parse_hotspot_config.ts

* Updated parse_hotspot_config.ts
  • Loading branch information
Shivam7-1 authored Apr 15, 2024
1 parent 99b50ff commit b3987ed
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ function parseHotspotConfig(element: HTMLElement): HotspotConfig {
throw new Error(`no surface or position for hotspot at slot "${
element.getAttribute('slot')}"`);
}
const annotation =
element.querySelector('.HotspotAnnotation')?.innerHTML || undefined;
const annotation = (element.querySelector('.HotspotAnnotation') as HTMLElement)?.innerText || undefined; // Update here
return {name, surface, position, normal, annotation};
}


/**
* Returns the slot name of the element without 'hotspot-'. Returns undefined if
* the slot name doesn't fit hotspot- format required by model-viewer.
Expand Down

0 comments on commit b3987ed

Please sign in to comment.