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

Conflict with turbolinks 5.0.0.beta4 #569

Closed
szyablitsky opened this issue May 6, 2016 · 3 comments
Closed

Conflict with turbolinks 5.0.0.beta4 #569

szyablitsky opened this issue May 6, 2016 · 3 comments

Comments

@szyablitsky
Copy link

Updated our application from version 2.3.0 of raven-js to 3.0.2.
Now I get the error every time click on any internal link

TypeError: a.match is not a function
  at r.Turbolinks.History.r.update (eval at <anonymous> (http://localhost:3500/vendor-bundle.js:3024:2), <anonymous>:8:11165)
  at r.Turbolinks.History.r.push (eval at <anonymous> (http://localhost:3500/vendor-bundle.js:3024:2), <anonymous>:8:10607)
  at e.Turbolinks.Controller.e.pushHistoryWithLocationAndRestorationIdentifier (eval at <anonymous> (http://localhost:3500/vendor-bundle.js:3024:2), <anonymous>:8:29305)
  at e.Turbolinks.Visit.e.changeHistory (eval at <anonymous> (http://localhost:3500/vendor-bundle.js:3024:2), <anonymous>:8:23290)
  at e.Turbolinks.BrowserAdapter.e.visitStarted (eval at <anonymous> (http://localhost:3500/vendor-bundle.js:3024:2), <anonymous>:8:8902)
...
(11 additional frame(s) were not displayed)

I think it is related to URL tracking (pushState) in new version of raven-js

@benvinegar
Copy link
Contributor

Hi @szyablitsky – I'll have a fix for this shortly and we'll push a new release.

@benvinegar
Copy link
Contributor

So, looking at the Turbolinks code, this is definitely being caused by a call to pushState – I'm guessing it's passing a non-string value for URL (since that's the only argument we inspect, and we do call .match on it). I've added a tighter check in #569.

@benvinegar
Copy link
Contributor

Okay, better yet, we experimented a little more w/ pushState and saw that it coerces objects to strings. I think the integration test better captures the behavior now.

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