Skip to content

Commit

Permalink
port fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dageavtobusnick committed Dec 27, 2024
1 parent 5c8fc6e commit a296711
Show file tree
Hide file tree
Showing 3 changed files with 227 additions and 207 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 @@ -38,10 +38,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() {
if (!refMap) {
Expand Down
248 changes: 126 additions & 122 deletions tgui/public/tgui-panel.bundle.js

Large diffs are not rendered by default.

174 changes: 93 additions & 81 deletions tgui/public/tgui.bundle.js

Large diffs are not rendered by default.

0 comments on commit a296711

Please sign in to comment.