Skip to content

Commit a88ce02

Browse files
committed
Fixed regex that resulted in an invalid range in older browsers
The regex [_/-\s] is invalid as it creates a range between the / and the \s characters. The hyphen needs to be escaped or at the end.
1 parent 9fd8128 commit a88ce02

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

addon/lib/system/inflector.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import Ember from 'ember';
33
var capitalize = Ember.String.capitalize;
44

55
var BLANK_REGEX = /^\s*$/;
6-
var LAST_WORD_DASHED_REGEX = /([\w/-]+[_/-\s])([a-z\d]+$)/;
7-
var LAST_WORD_CAMELIZED_REGEX = /([\w/-\s]+)([A-Z][a-z\d]*$)/;
6+
var LAST_WORD_DASHED_REGEX = /([\w/-]+[_/\s-])([a-z\d]+$)/;
7+
var LAST_WORD_CAMELIZED_REGEX = /([\w/\s-]+)([A-Z][a-z\d]*$)/;
88
var CAMELIZED_REGEX = /[A-Z][a-z\d]*$/;
99

1010
function loadUncountable(rules, uncountable) {

0 commit comments

Comments
 (0)