@@ -168,6 +168,22 @@
},
computed: computedFromDefaults(defaults, 'server'), // Getters & setters for the delegated data
watch: {
+ '$props.data.domain': {
+ handler(data) {
+ // This might cause recursion, but seems not to
+
+ // Ignore www. if given
+ if (data.computed.startsWith('www.')) {
+ data.computed = data.computed.slice(4);
+ }
+
+ // Use default if empty
+ if (!data.computed.trim()) {
+ data.computed = data.default;
+ }
+ },
+ deep: true,
+ },
// Only allow CDN when WWW is enabled first
'$props.data.wwwSubdomain': {
handler(data) {