Fix DmIcon BSOD (#27187)

* Fix DmIcon BSOD

* tgui rebuild

---------

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
This commit is contained in:
Aylong
2024-11-08 10:24:02 +00:00
committed by GitHub
co-authored by Burzah
parent afd52f006a
commit e9d01130c9
3 changed files with 48 additions and 44 deletions
+8 -4
View File
@@ -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() {
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long