diff --git a/src/components/ui/pagination/pagination.tsx b/src/components/ui/pagination/pagination.tsx index 0c318170..ad73f563 100644 --- a/src/components/ui/pagination/pagination.tsx +++ b/src/components/ui/pagination/pagination.tsx @@ -138,7 +138,7 @@ export class Pagination { } formatUrl(pageNumber) { - return this.url.format(pageNumber); + return this.url.formatReplace(pageNumber); } renderFirstPageButton () { diff --git a/src/global.d.ts b/src/global.d.ts index a344e7ca..82137179 100644 --- a/src/global.d.ts +++ b/src/global.d.ts @@ -18,7 +18,7 @@ declare interface TweenInstance { } declare interface String { - format(args: any): () => string; + formatReplace(args: any): () => string; } declare interface FormResult { diff --git a/src/utils/index.ts b/src/utils/index.ts index bc7eef29..73ed32ea 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -117,7 +117,7 @@ export var shuffle = function (array) { return array; }; -String.prototype['format'] = function() { +String.prototype['formatReplace'] = function() { var formatted = this; for( var arg in arguments ) { formatted = formatted.replace("{" + arg + "}", arguments[arg]);