Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

jolyndenning
Copy link

Summary

Today myself and others diagnosed an issue related to the documentation for IE11.

The existing documentation is incorrect because it changes the RegExp function such that RegExp.prototype.exec is no longer defined. After the exceljs IE11 polyfill, one must use RegExp.prototype.prototype.exec instead of RegExp.prototype.exec when trying to call exec directly. The reason is that RegExp.prototype is set to RegExp instead of RegExp.prototype, which adds an extra layer to the prototype chain.

It is reasonable to expect RegExp.prototype.exec to be defined, and for the API for using regular expressions to be unchanged after applying the polyfill in the exceljs documentation.

The fix here restores normal behavior for RegExp.prototype.exec.

Test plan

We verified this in our production application. But since this a bug in the documentation, there are no automated tests included in my PR.

Related to source code (for typings update)

N/A

@Siemienik Siemienik self-requested a review November 18, 2021 00:58
@Siemienik
Copy link
Member

LGTM, Thank you @joeldenning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants