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).
This commit is contained in:
patriceac 2023-02-17 18:49:51 -08:00 committed by GitHub
parent 130f9678b2
commit 92d3d9cd33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -375,7 +375,7 @@ function readUI() {
}
function getModelPath(filename, extensions)
{
if (filename === null) {
if (typeof filename !== "string") {
return
}