Skip to content

Objects prototypes extending #5507

@awesomejerry

Description

@awesomejerry

I was trying to polyfill my App by importing a file:

(function() {
  'use strict';

   String.prototype.format = function () {
     ....
   };
   ...
})()

And the error was caught

One of the sources for assign has an enumerable key on the prototype chain. This is an edge case that we do not support. This error is a performance optimization and not spec compliant.

It was totally ok in RN 0.15. It happens when I upgraded my project to RN 0.18

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions