fix: change unity game validation

This commit is contained in:
Akuoko Daniel Jnr 2020-11-15 17:14:36 +00:00
parent 2a03dd5384
commit 0f75dd13cb
No known key found for this signature in database
GPG Key ID: 1C95803CACD3E9DC

View File

@ -154,5 +154,7 @@ export const isUnityFile = async (file) => {
const fileNames = Object.keys(contents.files);
// NOTE(daniel): every Unity game file will have this file
return fileNames.includes("Build/UnityLoader.js");
const unityRegex = new RegExp(/unityloader.js/i);
return fileNames.some((file) => unityRegex.test(file));
};