Skip to content

Commit

Permalink
Fix DmIcon BSOD (#27187)
Browse files Browse the repository at this point in the history
* Fix DmIcon BSOD

* tgui rebuild

---------

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
  • Loading branch information
AyIong and Burzah authored Nov 8, 2024
1 parent afd52f0 commit e9d0113
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 44 deletions.
12 changes: 8 additions & 4 deletions tgui/packages/tgui/components/DmIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,14 @@ export class DmIcon extends Component<Props, { iconRef: string }> {
}

async fetchRefMap() {
const response = await fetchRetry(resolveAsset('icon_ref_map.json'));
const data = await response.json();
refMap = data;
this.setState({ iconRef: data[this.props.icon] });
try {
const response = await fetchRetry(resolveAsset('icon_ref_map.json'));
const data = await response.json();
refMap = data;
this.setState({ iconRef: data[this.props.icon] || '' });
} catch (err) {
return;
}
}

componentDidMount() {
Expand Down
78 changes: 39 additions & 39 deletions tgui/public/tgui-panel.bundle.js

Large diffs are not rendered by default.

Loading

0 comments on commit e9d0113

Please sign in to comment.