From 92d3d9cd33d0aa7c6c1691af438c4a4157510be7 Mon Sep 17 00:00:00 2001 From: patriceac <48073125+patriceac@users.noreply.github.com> Date: Fri, 17 Feb 2023 18:49:51 -0800 Subject: [PATCH] Fix filename parsing issue Here is a more robust fix for task restoration in dnd.js. Task restoration will fail if the JSON contains "use_face_correction": false, which can happen under some circumstances. The fix checks if the filename passed to getModelPath is actually a string, which covers both the previous scenario (filename === null) and this new one (filename === false). --- ui/media/js/dnd.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/media/js/dnd.js b/ui/media/js/dnd.js index 4f4fc22a..a7c83cc5 100644 --- a/ui/media/js/dnd.js +++ b/ui/media/js/dnd.js @@ -375,7 +375,7 @@ function readUI() { } function getModelPath(filename, extensions) { - if (filename === null) { + if (typeof filename !== "string") { return }