From: Yevhenii Kostiuk Date: Sat, 27 Oct 2018 12:55:50 +0000 (+0300) Subject: fix - Add to favorites not working in IE11 - polyfill needed #12007 X-Git-Tag: v14.0.4RC1~20^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F12339%2Fhead;p=nextcloud-server.git fix - Add to favorites not working in IE11 - polyfill needed #12007 Signed-off-by: Julius Härtl --- diff --git a/core/js/js.js b/core/js/js.js index c1b7e205aab..aa8710646e4 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -2491,3 +2491,9 @@ jQuery.fn.tipsy = function(argument) { } return this; }; + +/** + * Add to favorites not working in IE11 - polyfill needed #12007 + * @link https://github.com/nextcloud/server/issues/12007 + */ +if (!String.prototype.startsWith) { String.prototype.startsWith = function(searchString, position) { position = position || 0; return this.indexOf(searchString, position) === position; }; } \ No newline at end of file