Skip to content

Commit

Permalink
fix(stark-starter): add polyfill for String.prototype.trimRight
Browse files Browse the repository at this point in the history
IE11 required a polyfill for `String.prototype.trimRight`, this function was used by the `prettier`
dependency and caused an issue when using the `pretty-print` component.

ISSUES CLOSED: NationalBankBelgium#213
  • Loading branch information
carlo-nomes committed Nov 8, 2018
1 parent 63ce05f commit 5230b8c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions starter/src/polyfills.browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ import "zone.js/dist/zone";
/***************************************************************************************************
* APPLICATION IMPORTS
*/
/**
* IE11 requires a polyfill for trimRight (used by prettier library)
* see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trimEnd#Browser_compatibility
*/
import "core-js/modules/es7.string.trim-right";

/* tslint:disable:no-all-duplicated-branches */
if ("production" === ENV) {
Expand Down

0 comments on commit 5230b8c

Please sign in to comment.