Turf: [HELP] TurfJs breaking React-Native 0.50+ through name property

Created on 18 Dec 2017  路  5Comments  路  Source: Turfjs/turf

The library turf-jsts is trying to make the prop name configurable, but React-Native 0.50 crash when it tries to do it on android. The problem is at the turf-jsts.js line 3474.

My solution was convert the staticAccesorrs equal to an empty object, but I know that can create conflicts in the future, so I want to know more about this issue.

line 3474 var staticAccessors = { };
line 3479 // staticAccessors.name.get = function () { return 'IndexOutOfBoundsException' };
image

bug jsts

Most helpful comment

@Jose4gg I've changed the IndexOutOfBoundsException back to ES5. (https://github.com/DenisCarriere/turf-jsts/commit/ece9f6d68c2029cfba829f26e0ba7628c4e690da) and patched turf-jsts, maybe that will do the trick.

Instead of using @turf/turf in your app, why don't you use the specific modules? You're bundle size will be a lot smaller and you'll have a lot more control if you use the ES6 module syntax when you're bundling your distributed release.

Closing this issue for now, feel free to open if the issue persists.

All 5 comments

@Jose4gg I've changed the IndexOutOfBoundsException back to ES5. (https://github.com/DenisCarriere/turf-jsts/commit/ece9f6d68c2029cfba829f26e0ba7628c4e690da) and patched turf-jsts, maybe that will do the trick.

Instead of using @turf/turf in your app, why don't you use the specific modules? You're bundle size will be a lot smaller and you'll have a lot more control if you use the ES6 module syntax when you're bundling your distributed release.

Closing this issue for now, feel free to open if the issue persists.

@DenisCarriere Thanks! that fixed everything on my end. And about the suggestion, you are completely right, thanks so much for that too!

@DenisCarriere @Jose4gg This bug just popped up for me. What do I need to do in order to fix?

Same here. Any fix for this issue?

Same here...
Screenshot 2019-03-11 at 17 51 58

Was this page helpful?
0 / 5 - 0 ratings

Related issues

valeriik picture valeriik  路  4Comments

andrewharvey picture andrewharvey  路  3Comments

nkint picture nkint  路  4Comments

Spown picture Spown  路  3Comments

morganherlocker picture morganherlocker  路  5Comments