Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit a4ad63a

Browse files
committed
fix(parser): change regex to throw exception when incorrect format
1 parent 3a8e496 commit a4ad63a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/select.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
*/
5656
self.parse = function(expression) {
5757

58-
var match = expression.match(/^\s*(?:([\s\S]+?)\s+as\s+)?([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);
58+
var match = expression.match(/^\s*(?:([\s\S]+?)\s+as\s+)?([\S]+?)\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);
5959

6060
if (!match) {
6161
throw uiSelectMinErr('iexp', "Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",

0 commit comments

Comments
 (0)