Skip to content

Commit fa1f899

Browse files
author
Victor Homyakov
committed
Firefox 18+ supports String#startsWith, String#endsWith
1 parent 4ce0b0f commit fa1f899

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/prototype/lang/string.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -878,8 +878,9 @@ Object.extend(String.prototype, (function() {
878878
isJSON: isJSON,
879879
evalJSON: NATIVE_JSON_PARSE_SUPPORT ? parseJSON : evalJSON,
880880
include: include,
881-
startsWith: startsWith,
882-
endsWith: endsWith,
881+
// Firefox 18+ supports String.prototype.startsWith, String.prototype.endsWith
882+
startsWith: String.prototype.startsWith || startsWith,
883+
endsWith: String.prototype.endsWith || endsWith,
883884
empty: empty,
884885
blank: blank,
885886
interpolate: interpolate

0 commit comments

Comments
 (0)