Skip to content

ios9.3 need to add padStart polyfill to String.prototype #17442

@taojoe

Description

@taojoe

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

Environment:
OS: macOS High Sierra 10.13.2
Node: 8.9.3
Yarn: 1.3.2
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 2.3 AI-162.4069837

Packages: (wanted => installed)
react: 16.0.0 => 16.0.0
react-native: 0.50.3 => 0.50.3

Target Platform: iOS (9.3)

Steps to Reproduce

(Write your steps here:)

  1. use react-native init create a react native project
  2. call string.padStart function in any render function
class Welcome extends React.Component{
  render(){
    let tmp='abc'.padStart(12,'0');
    return (
      <View style={{flex:1}}>
      </View>
    );
  }
}

Expected Behavior

running correctly.

(Write what you thought would happen.)

Actual Behavior

(Write what happened. Add screenshots!)

'abc'.padStart is undefined

simulator screen shot - iphone 6 plus - 2018-01-04 at 19 47 36

Reproducible Demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Ran CommandsOne of our bots successfully processed a command.StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions