Skip to content

Commit 5e2973a

Browse files
committed
compatibility 3.8 & 3.9
1 parent 8fee035 commit 5e2973a

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"type": "kirby-plugin",
55
"license": "MIT",
66
"homepage": "https://getkirby.com/plugins/your-id/plugin-name",
7-
"version": "0.0.2",
7+
"version": "0.0.3",
88
"authors": [
99
{
1010
"name": "Roman Steiner",

index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,20 @@ panel.plugin("rasteiner/conditionalblocks", {
4141
};
4242
};
4343

44+
const inject = {
45+
constraints: {
46+
from: "constraints",
47+
default: {},
48+
},
49+
cwidth: {
50+
from: "cwidth",
51+
default: 1,
52+
},
53+
}
54+
4455
Vue.component("k-blocks", {
4556
extends: Blocks,
46-
inject: ["constraints", "cwidth"],
57+
inject: inject,
4758
methods: {
4859
append(what, index) {
4960
if(this.constraints && this.cwidth && Array.isArray(what)) {
@@ -69,7 +80,7 @@ panel.plugin("rasteiner/conditionalblocks", {
6980
},
7081
});
7182

72-
BlockSelector.inject = ["constraints", "cwidth"];
83+
BlockSelector.inject = inject;
7384

7485
const open = BlockSelector.methods.open;
7586
BlockSelector.methods.open = function () {

0 commit comments

Comments
 (0)