Skip to content

Commit

Permalink
using type helper for json stringify
Browse files Browse the repository at this point in the history
  • Loading branch information
manavortex committed May 4, 2024
1 parent 6a83988 commit 7e9ba2e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Scripts/Wolvenkit_FileValidation.wscript
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import * as Logger from 'Logger.wscript';
import * as TypeHelper from 'TypeHelper.wscript';
import {ArchiveXLConstants} from "./Internal/FileValidation/archiveXL_gender_and_body_types.wscript";
import {JsonStringify} from "TypeHelper.wscript";

/*
* .___ __ .__ __ .__ .__ _____.__.__
Expand Down Expand Up @@ -1816,10 +1817,10 @@ function meshFile_collectDynamicChunkMaterials(mesh) {
numAppearances = 0;
dynamicMaterials = {};
// null-safety
if (!mesh || typeof mesh === 'bigint') return;
if (!mesh || typeof mesh === 'bigint') return;

// it's not dynamic
if (!JSON.stringify(mesh).includes("@")) return;
if (!JsonStringify(mesh).includes("@")) return;

if (mesh.appearances.length < 2) {
Logger.Warning(`You need at least two appearances for dynamic appearances to work!`);
Expand Down

0 comments on commit 7e9ba2e

Please sign in to comment.