Skip to content

Breaks in IE10 #5

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

Closed
jhildenbiddle opened this issue Apr 11, 2018 · 1 comment
Closed

Breaks in IE10 #5

jhildenbiddle opened this issue Apr 11, 2018 · 1 comment

Comments

@jhildenbiddle
Copy link
Contributor

I know IE10 is becoming less relevant with every passing day, but I thought this was worth mentioning since docsify lists IE10 as an officially supported browser.

The error is caused by the use of Object.assign which is not supported by IE10 (line 20 in pagination.js):

let options = Object.assign({}, DEFAULT_OPTIONS, vm.config.

I made a quick fix by replacing the above line with the following:

let options = JSON.parse(JSON.stringify(DEFAULT_OPTIONS));

if (vm.config.pagination) {
  Object.keys(vm.config.pagination).forEach(key => {
    options[key] = vm.config.pagination[key]
  })
}

There are more elegant ways to merge objects, but the above code was intended as a quick test to see if replacing Object.assign would bring IE10 compatibility. The result is that IE10 no longer throws an error, but the page navigation is never rendered.

Usually I would explore more and try to solve the problem, but I am afraid I will be unable to do so for a few more days. Posting the issue here in case someone else wants to take on the task.

Thanks!

imyelo added a commit that referenced this issue Apr 11, 2018
imyelo added a commit that referenced this issue Apr 11, 2018
@imyelo imyelo closed this as completed in 6aa054c Apr 11, 2018
@imyelo
Copy link
Owner

imyelo commented Apr 11, 2018

Should be fixed in the newly version v2.2.0. Thanks again! 😄

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

2 participants