Clean up var declaration

pull/111/head
MattIPv4 5 years ago
parent 734a27a29d
commit 6c4afdeb6f

@ -155,8 +155,7 @@
// Disable everything if PHP is disabled
'$props.data.php': {
handler(data) {
const state = data.computed;
if (state) {
if (data.computed) {
this.$props.data.wordPressRules.enabled = true;
this.$props.data.wordPressRules.computed = this.$props.data.wordPressRules.value;
this.$props.data.drupalRules.enabled = true;

@ -111,8 +111,7 @@
// Disable Django if Python is disabled
'$props.data.python': {
handler(data) {
const state = data.computed;
if (state) {
if (data.computed) {
this.$props.data.djangoRules.enabled = true;
this.$props.data.djangoRules.computed = this.$props.data.djangoRules.value;
} else {

@ -131,8 +131,7 @@
// Disable all options if Reverse proxy is disabled
'$props.data.reverseProxy': {
handler(data) {
const state = data.computed;
if (state) {
if (data.computed) {
this.$props.data.path.enabled = true;
this.$props.data.path.computed = this.$props.data.path.value;
this.$props.data.proxyPass.enabled = true;

@ -158,8 +158,7 @@
// Disable all options (expect legacy php) if root is disabled
'$props.data.root': {
handler(data) {
const state = data.computed;
if (state) {
if (data.computed) {
this.$props.data.index.enabled = true;
this.$props.data.index.computed = this.$props.data.index.value;
this.$props.data.fallbackHtml.enabled = true;

@ -188,8 +188,7 @@
'$props.data.wwwSubdomain': {
handler(data) {
// This might cause recursion, but seems not to
const state = data.computed;
if (state) {
if (data.computed) {
this.$props.data.cdnSubdomain.enabled = true;
this.$props.data.cdnSubdomain.computed = this.$props.data.cdnSubdomain.value;
} else {

Loading…
Cancel
Save