diff --git a/.eslintrc.js b/.eslintrc.js index 2e7e98394..317092ad5 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -19,6 +19,8 @@ module.exports = { 'arrow-parens': 0, // allow async-await 'generator-star-spacing': 0, + // allow hasOwnProperty + 'no-prototype-builtins': 0, // allow debugger during development 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, 'no-console': process.env.NODE_ENV === 'production' ? ['error', { "allow": ["error"] }] : 'off', diff --git a/frontend/js/components/LocationField.vue b/frontend/js/components/LocationField.vue index fa3a29fa8..4f359f51f 100755 --- a/frontend/js/components/LocationField.vue +++ b/frontend/js/components/LocationField.vue @@ -42,6 +42,8 @@ const GOOGLEMAPURL = 'https://maps.googleapis.com/maps/api/js?libraries=places&key=' const APIKEY = window[process.env.VUE_APP_NAME].hasOwnProperty('APIKEYS') && window[process.env.VUE_APP_NAME].APIKEYS.hasOwnProperty('googleMapApi') ? window[process.env.VUE_APP_NAME].APIKEYS.googleMapApi : null + /* global google */ + export default { name: 'A17Locationfield', mixins: [InputMixin, InputframeMixin, LocaleMixin, FormStoreMixin], @@ -204,7 +206,7 @@ toggleMap: function () { this.isMapOpen = !this.isMapOpen this.mapMessage = this.isMapOpen ? MAPMESSAGE.hide : MAPMESSAGE.show - /* global google */ + if (!this.map && typeof google !== 'undefined') { this.$nextTick(function () { this.initMap() @@ -239,7 +241,6 @@ // Create the autocomplete object and associate it with the UI input control. this.autocompletePlace = new google.maps.places.Autocomplete(this.$el.querySelector('input[type="search"]')) // When a place is selected - /* global google */ google.maps.event.addListener(this.autocompletePlace, 'place_changed', this.onPlaceChanged) if (this.address === '' && this.lat && this.lng) { @@ -270,7 +271,6 @@ } }, mounted: function () { - /* global google */ if (typeof google !== 'undefined') { this.initGoogleApi() } else { @@ -283,7 +283,6 @@ } }, beforeDestroy: function () { - /* global google */ if (typeof google !== 'undefined') google.maps.event.clearListeners(this.autocompletePlace, 'place_changed', this.onPlaceChanged) } } diff --git a/frontend/js/components/Slideshow.vue b/frontend/js/components/Slideshow.vue index 5af54097e..14044fdba 100755 --- a/frontend/js/components/Slideshow.vue +++ b/frontend/js/components/Slideshow.vue @@ -2,7 +2,7 @@
-
+
diff --git a/frontend/js/utils/formDataAsObj.js b/frontend/js/utils/formDataAsObj.js index 6b66a0fc1..4c7e3d833 100755 --- a/frontend/js/utils/formDataAsObj.js +++ b/frontend/js/utils/formDataAsObj.js @@ -384,7 +384,6 @@ export default function (formNode) { let $domNode let domNodeValue const result = {} - let resultLength for (i = 0; i < $formElements.length; i++) { $domNode = $formElements[i] @@ -433,7 +432,7 @@ export default function (formNode) { } // Check the length of the result. - resultLength = getObjLength(result) + const resultLength = getObjLength(result) return resultLength > 0 ? result : false }