From 5d87a7582e12eddc164b6e953de215e25938e7a8 Mon Sep 17 00:00:00 2001 From: Richard Bowman Date: Fri, 1 Dec 2023 02:23:58 +0000 Subject: [PATCH] Format fixes --- .../settingsComponents/cameraSettings.vue | 2 +- webapp/src/main.js | 6 +++++- webapp/src/wot-client.js | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/webapp/src/components/tabContentComponents/settingsComponents/cameraSettings.vue b/webapp/src/components/tabContentComponents/settingsComponents/cameraSettings.vue index fbca1af1..e04c781e 100644 --- a/webapp/src/components/tabContentComponents/settingsComponents/cameraSettings.vue +++ b/webapp/src/components/tabContentComponents/settingsComponents/cameraSettings.vue @@ -143,7 +143,7 @@ export default { computed: { cameraUri: function() { return `${this.$store.getters.baseUri}/camera/`; - }, + } } }; diff --git a/webapp/src/main.js b/webapp/src/main.js index 934de84c..4dd2b266 100644 --- a/webapp/src/main.js +++ b/webapp/src/main.js @@ -67,7 +67,11 @@ Vue.mixin({ } }, thingActionUrl(thing, action) { - return this.$store.getters["wot/thingActionUrl"](thing, action, "invokeaction"); + return this.$store.getters["wot/thingActionUrl"]( + thing, + action, + "invokeaction" + ); }, modalConfirm: function(modalText) { var context = this; diff --git a/webapp/src/wot-client.js b/webapp/src/wot-client.js index 3f3ff923..688dfa87 100644 --- a/webapp/src/wot-client.js +++ b/webapp/src/wot-client.js @@ -75,8 +75,7 @@ export const wotStoreModule = { if ("base" in td) { let base = td.base; if (href.startsWith("/")) href = href.slice(1); - if (!base.endsWith("/")) - base += "/"; + if (!base.endsWith("/")) base += "/"; return base + href; } return href; @@ -96,6 +95,7 @@ export function findFormHref(affordance, op) { // Find the form in the affordance that matches the given operation type let forms = affordance.forms; let matchingForm = forms.find(f => f.op == op || f.op.includes(op)); + if (matchingForm == undefined) return undefined; return matchingForm.href; }