Closed kumavis closed 4 years ago
as a breaking change, you could have the module export { call, apply }
without overwriting callBind
's apply fn
maybe thats bug worthy on its own, without ses or ses-shim the following is true:
the exported callBind
fn is not called when attempted to be called via callBind.apply(...)
. it would instead incorrectly call the applyBind
function.
I think that it's reasonable to use https://github.com/ljharb/es-abstract/blob/master/helpers/DefineOwnProperty.js instead of assignment - I don't think a breaking change is warranted.
This assignment of
apply
on tomodule.exports
throws an error under the ses-shimhttps://github.com/ljharb/es-abstract/blob/67a1a94ee9c9b36d7505c0eac0e2b95a2811e5e4/helpers/callBind.js#L15
A non-breaking solution would be to append the export via
Reflect.defineProperty
instead of assignment