I use
requestConfig: {
endpoint: window.location.origin + "/sparql",
args: (yasqe) => {
return [{ name: "model", value: $('#model').val() }];
}
}
to dynamically set the argument model before executing a query.
When a new tab is created the error
Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.
occurs due to the following line:
https://github.com/zazuko/Yasgui/blob/919d19719036e47a3dcd89bb839230e6741c33d8/packages/yasgui/src/Tab.ts#L323
The exception occurs because srcValue is the value returned by the above args function while objValue is the function itself.
Maybe the checks must be combined by && instead of ||?
I use
to dynamically set the argument
modelbefore executing a query.When a new tab is created the error
occurs due to the following line:
https://github.com/zazuko/Yasgui/blob/919d19719036e47a3dcd89bb839230e6741c33d8/packages/yasgui/src/Tab.ts#L323
The exception occurs because
srcValueis the value returned by the above args function whileobjValueis the function itself.Maybe the checks must be combined by
&&instead of||?