Skip to content

Commit

Permalink
fixed instantiation of new arguments in functions
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewJSchoen committed Mar 2, 2022
1 parent 4b2e912 commit 6c77a3c
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 4 deletions.
4 changes: 4 additions & 0 deletions dist/components/Generators.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ var instanceTemplateFromSpec = function instanceTemplateFromSpec(type, objectSpe
};
}

if (objectSpec.type === _Constants.TYPES.FUNCTION) {
data.arguments = [];
}

return data;
};

Expand Down
2 changes: 1 addition & 1 deletion docs/iframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -345,4 +345,4 @@



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>
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>
1 change: 1 addition & 0 deletions docs/main.2f2ee6f3.iframe.bundle.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/main.3ad05fba.iframe.bundle.js

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simple-vp",
"version": "0.1.9",
"version": "0.1.10",
"main": "dist/index.js",
"private": false,
"files": [
Expand Down
5 changes: 4 additions & 1 deletion src/components/Generators.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DATA_TYPES } from './Constants';
import { DATA_TYPES, TYPES } from './Constants';

export const instanceTemplateFromSpec = (type, objectSpec, isArg) => {
let data = {
Expand All @@ -20,6 +20,9 @@ export const instanceTemplateFromSpec = (type, objectSpec, isArg) => {
if (objectSpec.instanceBlock?.onCanvas) {
data.position = { x: 0, y: 0 };
}
if (objectSpec.type === TYPES.FUNCTION) {
data.arguments = []
}
return data;
};

Expand Down

0 comments on commit 6c77a3c

Please sign in to comment.