more debugging

This commit is contained in:
d98762625 2019-03-11 09:47:58 +00:00
parent e4b688a2c3
commit 14d591caa1
4 changed files with 24 additions and 4 deletions

View file

@ -140,7 +140,7 @@ function prepareOp(opInstance, input, args) {
function createArgOptions(op) {
const result = {};
op.args.forEach((a) => {
if (a.type === "option") {
if (a.type === "option" || a.type === "editableOption") {
result[sentenceToCamelCase(a.name)] = removeSubheadingsFromArray(a.value);
} else if (a.type === "toggleString") {
result[sentenceToCamelCase(a.name)] = removeSubheadingsFromArray(a.toggleValues);
@ -183,7 +183,7 @@ export function wrap(OpClass) {
const result = await opInstance.run(transformedInput, transformedArgs);
return new NodeDish({
value: result,
type: opInstance.outputType
type: opInstance.outputType,
});
};
} else {
@ -197,9 +197,11 @@ export function wrap(OpClass) {
wrapped = (input, args=null) => {
const {transformedInput, transformedArgs} = prepareOp(opInstance, input, args);
const result = opInstance.run(transformedInput, transformedArgs);
console.log('Result:');
console.log(result);
return new NodeDish({
value: result,
type: opInstance.outputType
type: opInstance.outputType,
});
};
}