Skip to content

Commit 6c77a3c

Browse files
committed
fixed instantiation of new arguments in functions
1 parent 4b2e912 commit 6c77a3c

File tree

6 files changed

+11
-4
lines changed

6 files changed

+11
-4
lines changed

dist/components/Generators.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ var instanceTemplateFromSpec = function instanceTemplateFromSpec(type, objectSpe
4545
};
4646
}
4747

48+
if (objectSpec.type === _Constants.TYPES.FUNCTION) {
49+
data.arguments = [];
50+
}
51+
4852
return data;
4953
};
5054

docs/iframe.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,4 +345,4 @@
345345

346346

347347

348-
window['STORIES'] = [{"titlePrefix":"","directory":"./src","files":"**/*.stories.mdx","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.mdx)$"},{"titlePrefix":"","directory":"./src","files":"**/*.stories.@(js|jsx|ts|tsx)","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.(js|jsx|ts|tsx))$"}];</script><script src="runtime~main.c5c5bf95.iframe.bundle.js"></script><script src="198.49e7da1a.iframe.bundle.js"></script><script src="main.3ad05fba.iframe.bundle.js"></script></body></html>
348+
window['STORIES'] = [{"titlePrefix":"","directory":"./src","files":"**/*.stories.mdx","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.mdx)$"},{"titlePrefix":"","directory":"./src","files":"**/*.stories.@(js|jsx|ts|tsx)","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.(js|jsx|ts|tsx))$"}];</script><script src="runtime~main.c5c5bf95.iframe.bundle.js"></script><script src="198.49e7da1a.iframe.bundle.js"></script><script src="main.2f2ee6f3.iframe.bundle.js"></script></body></html>

docs/main.2f2ee6f3.iframe.bundle.js

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

docs/main.3ad05fba.iframe.bundle.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "simple-vp",
3-
"version": "0.1.9",
3+
"version": "0.1.10",
44
"main": "dist/index.js",
55
"private": false,
66
"files": [

src/components/Generators.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { DATA_TYPES } from './Constants';
1+
import { DATA_TYPES, TYPES } from './Constants';
22

33
export const instanceTemplateFromSpec = (type, objectSpec, isArg) => {
44
let data = {
@@ -20,6 +20,9 @@ export const instanceTemplateFromSpec = (type, objectSpec, isArg) => {
2020
if (objectSpec.instanceBlock?.onCanvas) {
2121
data.position = { x: 0, y: 0 };
2222
}
23+
if (objectSpec.type === TYPES.FUNCTION) {
24+
data.arguments = []
25+
}
2326
return data;
2427
};
2528

0 commit comments

Comments
 (0)