diff --git a/.gitignore b/.gitignore index d95cc37d5..dcf23d344 100755 --- a/.gitignore +++ b/.gitignore @@ -5,5 +5,5 @@ node_modules .history .DS_Store \.settings/ -src/config/env.js +build/env.js dist \ No newline at end of file diff --git a/build/env.js b/build/env.js deleted file mode 100644 index e56df38d7..000000000 --- a/build/env.js +++ /dev/null @@ -1 +0,0 @@ -export default "production"; \ No newline at end of file diff --git a/build/webpack.dev.config.js b/build/webpack.dev.config.js index be590040e..1b19232a9 100755 --- a/build/webpack.dev.config.js +++ b/build/webpack.dev.config.js @@ -7,7 +7,7 @@ const webpackBaseConfig = require('./webpack.base.config.js'); const fs = require('fs'); const package = require('../package.json'); -fs.open('./env.js', 'w', function(err, fd) { +fs.open('./build/env.js', 'w', function(err, fd) { const buf = 'export default "development";'; fs.write(fd, buf, 0, buf.length, 0, function(err, written, buffer) {}); }); diff --git a/env.js b/env.js deleted file mode 100644 index 87f40f009..000000000 --- a/env.js +++ /dev/null @@ -1 +0,0 @@ -export default "development"; \ No newline at end of file diff --git a/src/libs/util.js b/src/libs/util.js index 2c58ddd8e..3e3e6e59d 100755 --- a/src/libs/util.js +++ b/src/libs/util.js @@ -41,7 +41,7 @@ util.oneOf = function (ele, targetArr) { }; util.showThisRoute = function (itAccess, currentAccess) { - if (typeof itAccess === 'object' && itAccess.isArray()) { + if (typeof itAccess === 'object' && Array.isArray(itAccess)) { return util.oneOf(currentAccess, itAccess); } else { return itAccess === currentAccess;