Add extra validation on custom downloaded themes
This commit is contained in:
parent
818cd62abc
commit
6f9199f1ad
3 changed files with 45 additions and 23 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue