Skip to content
This repository was archived by the owner on Jul 6, 2021. It is now read-only.
This repository was archived by the owner on Jul 6, 2021. It is now read-only.

String.prototype['format'] causes downstream conflicts in Stellar for Wordpress #8

@jonjonsiler

Description

@jonjonsiler

Adding format method to the String.prototype causes downstream conflicts with plugins such as Gravity Forms implementation of String.prototype.format in the Stellar for Wordpress library.
/src/utils/index.ts

String.prototype['format'] = function() {
  var formatted = this;
  for( var arg in arguments ) {
    formatted = formatted.replace("{" + arg + "}", arguments[arg]);
  }
  return formatted;
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions