diff --git a/webapp/src/main.js b/webapp/src/main.js index 57da92d3..83ee53e2 100644 --- a/webapp/src/main.js +++ b/webapp/src/main.js @@ -71,12 +71,12 @@ Vue.mixin({ } await axios.put(url, value); }, - thingActionUrl(thing, action) { + thingActionUrl(thing, action, allow_missing=false) { let url = this.$store.getters["wot/thingActionUrl"]( thing, action, "invokeaction", - false + allow_missing ); return url; }, diff --git a/webapp/src/wot-client.js b/webapp/src/wot-client.js index b1aa58d6..94c738a8 100644 --- a/webapp/src/wot-client.js +++ b/webapp/src/wot-client.js @@ -120,6 +120,7 @@ export const wotStoreModule = { export function findFormHref(affordance, op) { // Find the form in the affordance that matches the given operation type + if (affordance == undefined) return undefined; let forms = affordance.forms; let matchingForm = forms.find(f => f.op == op || f.op.includes(op)); if (matchingForm == undefined) return undefined;