Skip to content

Commit ac2ad74

Browse files
committed
registering of legacy components
1 parent 5bcfd3f commit ac2ad74

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

assets/js/markdowncard.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ Vue.component("markdown-card", {
5050
document.body.removeChild(el);
5151
},
5252
extractContent() {
53-
if (this.hasSlotContent && this.$slots.default[0].text) {
54-
return this.$slots.default[0].text.trim();
53+
if (this.hasSlotContent && this.$slots.default[0]?.text) {
54+
return this.$slots.default[0]?.text.trim();
5555
}
5656
return this.text;
5757
}

assets/js/markdowntext.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ Vue.component("markdown-text", {
2727
},
2828
methods: {
2929
extractContent() {
30-
if (this.hasSlotContent && this.$slots.default[0].text) {
31-
return this.$slots.default[0].text.trim();
30+
if (this.hasSlotContent && this.$slots.default[0]?.text) {
31+
return this.$slots.default[0]?.text.trim();
3232
}
3333
return this.text;
3434
}

src/StippleMarkdown.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ end
152152

153153
function __init__()
154154
deps_routes()
155+
Stipple.register_global_components(StippleMarkdown, "markdown-text", legacy = true)
156+
Stipple.register_global_components(StippleMarkdown, "markdown-card", legacy = true)
155157
Stipple.deps!(@__MODULE__, deps)
156158
end
157159

0 commit comments

Comments
 (0)