Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE8 problems #240

Open
indvd00m opened this issue Mar 29, 2018 · 4 comments
Open

IE8 problems #240

indvd00m opened this issue Mar 29, 2018 · 4 comments

Comments

@indvd00m
Copy link

File moment-range.js contains objects fields with name "default" and "for". This is broke working of moment-range in Internet Explorer 8 because of IE treat this fields as keywords.

@gf3
Copy link
Contributor

gf3 commented Mar 29, 2018

hi! how are you including moment-range in your app? and are you using a build system?

@indvd00m
Copy link
Author

No, there is no build system for client-side code in this project. File moment-range.js was downloaded from CDN and included as <script/> tag.

@TristanJM
Copy link
Contributor

@indvd00m Are you including the files as follows?

<script src="CDN for moment.js"></script>
<script src="CDN for moment-range.js"></script>

<script>
    window['moment-range'].extendMoment(moment);
    // ...
</script>

@indvd00m
Copy link
Author

indvd00m commented Apr 6, 2018

Yes, all included in accordence with documentation. Just open the file from first comment in this issue, line 137:

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

This is same problem as here, for example: martinandert/counterpart#6

As a temporary solution I escaped "default" and "for" fields with quotes when them declared, and replace .field_name with ['field_name'] construction when them used. Or it is possible just rename this fields.

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

No branches or pull requests

3 participants