From 04ad27fa121b9cfa3908010f34bab369e9fc77a4 Mon Sep 17 00:00:00 2001 From: dageavtobusnick <71216640+dageavtobusnick@users.noreply.github.com> Date: Fri, 27 Dec 2024 23:20:58 +0500 Subject: [PATCH] port fix --- tgui/packages/tgui/components/DmIcon.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tgui/packages/tgui/components/DmIcon.tsx b/tgui/packages/tgui/components/DmIcon.tsx index 94cffe7f8c4..1580e61979d 100644 --- a/tgui/packages/tgui/components/DmIcon.tsx +++ b/tgui/packages/tgui/components/DmIcon.tsx @@ -38,10 +38,14 @@ export class DmIcon extends Component { }; } 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) {