Add extra validation on custom downloaded themes

This commit is contained in:
Pieter Vander Vennet 2022-09-11 01:49:07 +02:00
parent 818cd62abc
commit 6f9199f1ad
3 changed files with 45 additions and 23 deletions

View file

@ -122,7 +122,7 @@ export default class ScriptUtils {
return root.svg
}
public static async ReadSvgSync(path: string, callback: (svg: any) => void): Promise<any> {
public static ReadSvgSync(path: string, callback: (svg: any) => void): any {
xml2js.parseString(readFileSync(path, "UTF8"), { async: false }, (err, root) => {
if (err) {
throw err