Commit 4a46240e authored by nanahira's avatar nanahira

arg def extended

parent e3c5da37
...@@ -46,13 +46,14 @@ export namespace CommandPut { ...@@ -46,13 +46,14 @@ export namespace CommandPut {
); );
preRegistry.extend('arg', (data, cmd, ctx, nativeType) => { preRegistry.extend('arg', (data, cmd, ctx, nativeType) => {
const arg = cmd._arguments[data.index]; let arg = cmd._arguments[data.index];
if (arg) { if (arg) {
arg = {};
cmd._arguments[data.index] = arg;
}
applyNativeTypeToArg(arg, nativeType); applyNativeTypeToArg(arg, nativeType);
} else if (data.decl) { if (data.decl) {
const decl = { ...data.decl }; Object.assign(arg, data.decl);
applyNativeTypeToArg(decl, nativeType);
cmd._arguments[data.index] = decl;
} }
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment