fix(showcase): fixed an issue where the position wouldn't load in wallpaper engine

This commit is contained in:
Haoyu Xu
2023-01-31 10:31:27 -05:00
parent 3efd3cb11a
commit 87d9bfd092
5 changed files with 26 additions and 33 deletions

View File

@@ -24,15 +24,7 @@ export default class Matcher {
'assets',
`return new Evalable(config, assets).${name}`)
)(Evalable, this.#config, this.#assets)
if (matches.length > 1) {
try {
this.content = this.content.replace(match, result)
} catch (e) {
throw new Error(e)
}
} else if (matches.length === 1) {
this.content = result
}
this.content = matches.length > 1 ? this.content.replace(match, result) : result
})
}
return this.content