vaderjs 1.1.8 → 1.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/vader.js +15 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vaderjs",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.9",
|
|
4
4
|
"description": "A Reactive Framework for Single-Page Applications (SPA)",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"bugs": {
|
|
23
23
|
"url": "https://github.com/Postr-Inc/Vader.js/issues"
|
|
24
24
|
},
|
|
25
|
-
"homepage": "https://
|
|
25
|
+
"homepage": "https://vader-js.pages.dev",
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"typescript": "^5.2.2"
|
|
28
28
|
}
|
package/vader.js
CHANGED
|
@@ -692,7 +692,21 @@ export class Component {
|
|
|
692
692
|
*/
|
|
693
693
|
html(strings, ...args) {
|
|
694
694
|
// @ts-ignore
|
|
695
|
-
|
|
695
|
+
if (
|
|
696
|
+
// @ts-ignore
|
|
697
|
+
new Error().stack &&
|
|
698
|
+
// @ts-ignore
|
|
699
|
+
new Error().stack.split("\n").length > 0 &&
|
|
700
|
+
// @ts-ignore
|
|
701
|
+
new Error().stack.split("\n")[2] &&
|
|
702
|
+
// @ts-ignore
|
|
703
|
+
new Error().stack.split("\n")[2].includes("render") &&
|
|
704
|
+
!this.componentMounted
|
|
705
|
+
) {
|
|
706
|
+
this.componentMounted = true;
|
|
707
|
+
this.componentDidMount();
|
|
708
|
+
console.log("component mounted");
|
|
709
|
+
}
|
|
696
710
|
|
|
697
711
|
let result = "";
|
|
698
712
|
for (let i = 0; i < strings.length; i++) {
|
|
@@ -853,10 +867,6 @@ export class Component {
|
|
|
853
867
|
|
|
854
868
|
data-component="${this.name}">${result}</div>`;
|
|
855
869
|
}
|
|
856
|
-
if (caller.includes("render") && !this.componentMounted) {
|
|
857
|
-
this.componentMounted = true;
|
|
858
|
-
this.componentDidMount();
|
|
859
|
-
}
|
|
860
870
|
|
|
861
871
|
return result;
|
|
862
872
|
}
|