Skip to content

Commit 98cd065

Browse files
committed
fix parseQuery issue
airyland/vux#1614
1 parent 3cae022 commit 98cd065

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vux-loader",
3-
"version": "1.0.68",
3+
"version": "1.0.69",
44
"description": "extended loader for vue-loader",
55
"main": "src/index.js",
66
"keywords": [

Diff for: src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ module.exports = function (source) {
6363
const BEFORE_TEMPLATE_COMPILER = utils.stringifyRequest(this, beforeTemplateCompilerLoader).replace(/"/g, '')
6464

6565

66-
var query = utils.parseQuery(this.query)
66+
var query = this.query ? utils.parseQuery(this.query) : {}
6767
this.cacheable()
6868
if (!source) return source
6969
const config = this.vux || utils.getLoaderConfig(this, 'vux')

Diff for: src/template-loader.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const getName = function (path) {
1717
module.exports = function (source) {
1818
const _this = this
1919
this.cacheable()
20-
const query = utils.parseQuery(this.query)
20+
const query = this.query ? utils.parseQuery(this.query) : {}
2121
const config = this.vux || utils.getLoaderConfig(this, 'vux')
2222
if (!config.plugins || !config.plugins.length) {
2323
return source

0 commit comments

Comments
 (0)