diff --git a/build/webpack.dev.config.js b/build/webpack.dev.config.js index d58ac4ac..9c18a9da 100644 --- a/build/webpack.dev.config.js +++ b/build/webpack.dev.config.js @@ -6,7 +6,7 @@ const baseWebpackConfig = require('./webpack.base.config') const utils = require('./utils') const webpackConfig = merge(baseWebpackConfig, { - devtool: '#cheap-module-eval-source-map', + // devtool: '#cheap-module-eval-source-map', plugins: [ new webpack.HotModuleReplacementPlugin(), // https://github.com/ampedandwired/html-webpack-plugin diff --git a/src/component/vector-source/source.vue b/src/component/vector-source/source.vue index 880116db..bc33797a 100644 --- a/src/component/vector-source/source.vue +++ b/src/component/vector-source/source.vue @@ -2,7 +2,7 @@ import VectorSource from 'ol/source/Vector' import { vectorSource } from '../../mixin' import { createGeoJsonFmt, getFeatureId, initializeFeature, loadingAll, transform } from '../../ol-ext' - import { constant, difference, isEqual, isFinite, isFunction, stubArray } from '../../util/minilo' + import { constant, difference, isEqual, isFinite, isFunction, stubArray, isArray, isString } from '../../util/minilo' import { makeWatchers } from '../../util/vue-helpers' export default { @@ -82,10 +82,10 @@ resolution, this.resolvedDataProjection, ) - if (!Array.isArray(features)) { + if (isString(features) && features !== '') { features = this.readSourceData(features) } - if (Array.isArray(features)) { + if (isArray(features)) { this.addFeatures(features) } } diff --git a/test/app.vue b/test/app.vue index 519badf3..fac4a3aa 100644 --- a/test/app.vue +++ b/test/app.vue @@ -12,7 +12,7 @@ - + @@ -22,7 +22,7 @@