From 664cbbe09b522647e5439636ef4a63dcc9c3330a Mon Sep 17 00:00:00 2001
From: Svornost <11434-svornost@users.noreply.gitgud.io>
Date: Sun, 31 May 2020 00:23:42 -0700
Subject: [PATCH] Improve robustness of art asset lookup...if an asset is not
 found, issue a console error and move on instead of crashing hard.

---
 js/artInfrastructure.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/js/artInfrastructure.js b/js/artInfrastructure.js
index b9d97316439..c709c72c034 100644
--- a/js/artInfrastructure.js
+++ b/js/artInfrastructure.js
@@ -60,6 +60,10 @@ App.Art.SvgQueue = class {
 	add(id) {
 		const res = this._cache.get(id);
 		let clones = [];
+		if (!res) {
+			console.error(`Missing art resource: ${id}`);
+			return;
+		}
 		for (const srcNode of res.children) {
 			/** @type {Element} */
 			const node = srcNode.cloneNode(true);
-- 
GitLab