Skip to content

Commit 4843d00

Browse files
committed
src/resources/js/util.js fix for IE11 - angular.io/pull/3095
angular/angular.io#3095
1 parent 813b12e commit 4843d00

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

gulp/ngio-get.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ module.exports = function (gulp, plugins, config) {
230230
// Patch live-example.js
231231
.pipe(replace(/target: '_blank/g, '$&" rel="noopener'))
232232
// Patch resources/js/util.js
233-
.pipe(replace("loc.includes('/docs/' + lang + '/')", "loc.includes('/angular/')"))
233+
.pipe(replace("loc.indexOf('/docs/' + lang + '/')", "loc.indexOf('/angular/')"))
234234
.pipe(gulp.dest('src'));
235235
});
236236

src/resources/js/util.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var NgIoUtil = (function () {
66

77
NgIoUtil.isDoc = function ($location, lang) {
88
var loc = $location.absUrl();
9-
return loc.includes('/angular/');
9+
return loc.indexOf('/angular/') >= 0;
1010
};
1111

1212
// The following util functions are adapted from _utils-fn.jade.
@@ -19,7 +19,7 @@ var NgIoUtil = (function () {
1919
*
2020
* - app/main.ts -> web/main.dart
2121
* - displaying-data/ts/app/app.component.2.ts -> displaying-data/dart/lib/app_component.dart
22-
*
22+
*
2323
* Notice that the '.2' is dropped from the name.
2424
*/
2525
if (!_path) return _path;

0 commit comments

Comments
 (0)