rax icon indicating copy to clipboard operation
rax copied to clipboard

[BUG] Remove Object.assign in rax

Open SoloJiang opened this issue 4 years ago • 4 comments

In android 5.x or before this version, there isn't Object.assign method, but rax used it as assign method.

https://github.com/alibaba/rax/blob/master/packages/rax/src/assign.js

SoloJiang avatar May 19 '21 09:05 SoloJiang

hi @SoloJiang , Is Asoc 2021 is happing or it will happen or it will not happen in 2021 , I did not find any link,news for Asoc 2021.

Pawanupadhyay10 avatar May 20 '21 14:05 Pawanupadhyay10

What's your meaning? May u search it on caniuse?

SoloJiang avatar May 22 '21 08:05 SoloJiang

Adding some links and info as I've used a Polyfill for this before (and in a project that uses Rax).

For most users it will not have an impact but for users with older Android devices (IE, etc) it will prevent the site from working.

Here is the caniuse link: https://caniuse.com/?search=object.assign

A widely used Polyfill Service is this one (created by a British/Global News Paper "Financial Times"). https://polyfill.io/v3/

This is the source (MIT License) so it can simply be copied if needed: https://github.com/Financial-Times/polyfill-library/blob/master/polyfills/Object/assign/polyfill.js

A more basic version of the polyfill is here: https://stackoverflow.com/a/42503820/3422084

I was just browsing open issues and haven't looked into the details of how Rax works for Polyfills but hopefully these links can help reduce the amount of work you need to do if handling this issue.

ConradSollitt avatar Jun 10 '22 06:06 ConradSollitt

Also if you need help with this issue let me know. I'm happy to help.

ConradSollitt avatar Jun 10 '22 07:06 ConradSollitt