Skip to content

Commit

Permalink
Update Interstitial.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanpro committed Sep 29, 2023
1 parent 36048cc commit 818f97b
Showing 1 changed file with 20 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,20 @@ import ScreenSelect from "./ScreenSelect";
export default {
components: { ScreenSelect },
props: ["value", "label", "helper", "enabledByDefault"],
props: {
label: {
type: String,
default: '',
},
helper: {
type: String,
default: '',
},
enabledByDefault: {
type: Boolean,
default: false
},
},
data() {
return {
screen: null,
Expand All @@ -45,7 +58,7 @@ export default {
const { node } = this;
// Get the value of allowInterstitial or set it to true if it hasn't been defined yet.
const value = _.get(node, "allowInterstitial", this.enabledByDefault || false);
const value = _.get(node, "allowInterstitial", this.enabledByDefault);
this.screen = _.get(node, "interstitialScreenRef");
return value;
Expand All @@ -61,12 +74,6 @@ export default {
this.$set(this.node, "interstitialScreenRef", value);
},
},
allowInterstitialGetter: {
handler(value) {
this.allowInterstitialSetter(value);
},
immediate: true,
},
},
methods: {
/**
Expand All @@ -76,5 +83,10 @@ export default {
this.$set(this.node, "allowInterstitial", value);
},
},
mounted() {
if (!("allowInterstitial" in this.node)) {
this.$set(this.node, "allowInterstitial", this.enabledByDefault);
}
}
};
</script>

0 comments on commit 818f97b

Please sign in to comment.