Clean up var declaration

This commit is contained in:
MattIPv4 2020-04-30 21:02:27 +01:00
parent 734a27a29d
commit 6c4afdeb6f
5 changed files with 5 additions and 10 deletions

View file

@ -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;

View file

@ -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 {

View file

@ -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;

View file

@ -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;

View file

@ -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 {