Skip to content

Commit 6422dfb

Browse files
committed
Fixed invalid regex victorjonsson#538
1 parent b3dec41 commit 6422dfb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/setup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
$.split = function (val, callback, allowSpaceAsDelimiter) {
1818
// default to true
1919
allowSpaceAsDelimiter = allowSpaceAsDelimiter === undefined || allowSpaceAsDelimiter === true;
20-
var pattern = '[,|\-'+(allowSpaceAsDelimiter ? '\\s':'')+']\\s*',
20+
var pattern = '[,|'+(allowSpaceAsDelimiter ? '\\s':'')+'-]\\s*',
2121
regex = new RegExp(pattern, 'g');
2222
if (typeof callback !== 'function') {
2323
// return array

0 commit comments

Comments
 (0)