fix(core): update

This commit is contained in:
Philipp Kunz 2021-05-19 15:21:47 +00:00
parent 567507c88b
commit 6ddfaffbff
3 changed files with 8 additions and 6 deletions

View File

@ -10,7 +10,7 @@
"scripts": {
"test": "(tstest test/ --web)",
"build": "(tsbuild --web)",
"format": "(gitzone format)"
"serve": "tsrun scripts/serve.ts"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.25",

View File

@ -14,7 +14,7 @@ tap.test('should start the smartssr instance', async () => {
});
tap.test('should render central.eu', async (tools) => {
await testSSRInstance.renderPage('https://in.work');
await testSSRInstance.renderPage('https://lossless.com');
});
tap.skip.test('should render lossless.com', async () => {

View File

@ -63,11 +63,13 @@ export function serializeFunction(rootNode) {
const noteForAppending: HTMLElement[] = [];
// lets care about static css first
if ((nodeArg.constructor as any).styles?.cssText) {
if ((nodeArg.constructor as any).styles && (nodeArg.constructor as any).styles instanceof Array) {
for (const objectArg of (nodeArg.constructor as any).styles) {
const styleTag = document.createElement('style');
styleTag.textContent = prependCss(nodeUUID, (nodeArg.constructor as any).styles.cssText);
styleTag.textContent = prependCss(nodeUUID, objectArg.cssText);
noteForAppending.push(styleTag);
}
}
childNodes.forEach((childNode) => {
if (childNode instanceof HTMLElement) {