summaryrefslogtreecommitdiff
path: root/app.js
diff options
context:
space:
mode:
authorMhykol <mchaeldonald62@pm.me>2024-06-22 03:38:28 -0400
committerMhykol <mchaeldonald62@pm.me>2024-06-22 03:38:28 -0400
commit1c32f5626abe1c55712ccd6a3c9110a81050889f (patch)
tree987648c25efbec889ca40a96345fd0479526acc5 /app.js
parent1dd31494f0e270f24c2caad411e271b9bf5c781c (diff)
Fixed errors for non-async functions and assets
Diffstat (limited to 'app.js')
-rw-r--r--app.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/app.js b/app.js
index 9b95eb1..c18ecec 100644
--- a/app.js
+++ b/app.js
@@ -128,11 +128,16 @@ class App {
})
})
} catch {
- const object = {
- js: output.assets.js,
- css: output.assets.css
+ const object = {}
+ try {
+ object.js = output.assets.js
+ object.css = output.assets.css
+ } catch (err) {
+ object.js = []
+ object.css = []
}
- this.readfile.Create(output.html).then(output => {
+
+ this.readfile.Create(output.get(this.path.string).html).then(output => {
const DOMPurify = createDOMPurify(new JSDOM('').window)
const clean = DOMPurify.sanitize(output.layouts.header + output.layouts.data + output.layouts.footer, {
ADD_TAGS: ['iframe'], ADD_ATTR: ['allow', 'allowfullscreen', 'frameborder', 'scrolling']