Readme example error #13

Closed
opened 2014-08-10 13:24:06 -05:00 by benjamingeorge · 4 comments
benjamingeorge commented 2014-08-10 13:24:06 -05:00 (Migrated from github.com)

When I try to implement the demo in the readme (sideBySide switch) I get an error.

Pjax switch fail:  ReferenceError {stack: (...), message: "forEach is not defined"}
 pjax.js:431
(anonymous function) pjax.js:431
request.onreadystatechange

This error only happens with using sideBySide switch

switches: {
            ".js-Pjax": Pjax.switches.sideBySide
          }

using outerHtml or innerHtml does not throw this error. I'm using the latest Chrome browser.

When I try to implement the demo in the readme (sideBySide switch) I get an error. ``` Pjax switch fail: ReferenceError {stack: (...), message: "forEach is not defined"} pjax.js:431 (anonymous function) pjax.js:431 request.onreadystatechange ``` This error only happens with using sideBySide switch ``` switches: { ".js-Pjax": Pjax.switches.sideBySide } ``` using outerHtml or innerHtml does not throw this error. I'm using the latest Chrome browser.
MoOx commented 2014-08-10 13:31:06 -05:00 (Migrated from github.com)

Sorry for that bug, I'm working on a branch to test the entire library but right now I'm focused on something else.

I think I found the bug here.

Can you try adding var forEach = Array.prototype.forEach in the global scope & confirm me that this snippet fix this bug ?

Sorry for that bug, I'm working on a branch to test the entire library but right now I'm focused on something else. I think I found the bug here. Can you try adding `var forEach = Array.prototype.forEach` in the global scope & confirm me that this snippet fix this bug ?
benjamingeorge commented 2014-08-10 18:19:36 -05:00 (Migrated from github.com)

that fixed the undefined error but now I'm getting:
Pjax switch fail: TypeError {stack: (...), message: "Cannot read property 'callbacks' of undefined"}

that fixed the undefined error but now I'm getting: Pjax switch fail: TypeError {stack: (...), message: "Cannot read property 'callbacks' of undefined"}
MoOx commented 2014-08-10 18:27:51 -05:00 (Migrated from github.com)

I published that part without any serious tests :/

Here is how I'm using pjax v0.1.x 147ccd6ff5/src/assets/_scripts/vanilla.js (L47-L84)

This should help you to get necessary stuff.

For the styles, here is what I'm using 24e851a8f5/src/assets/_styles/partials/_animation.scss

I published that part without any serious tests :/ Here is how I'm using pjax v0.1.x https://github.com/MoOx/moox.github.io/blob/147ccd6ff5cf6768d0dd8b4131581203055e10ff/src/assets/_scripts/vanilla.js#L47-L84 This should help you to get necessary stuff. For the styles, here is what I'm using https://github.com/MoOx/moox.github.io/blob/24e851a8f5d7c2fe7559c4d19642aa25c4394708/src/assets/_styles/partials/_animation.scss
MoOx commented 2014-10-14 00:43:24 -05:00 (Migrated from github.com)

Fixes should be available in 0.1.4

Fixes should be available in 0.1.4
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: iLoveElysia/pjax#13