Permalink
Browse files

adds support for Turbolinks

  • Loading branch information...
1 parent 25ac90d commit 559971a53cb48cdfb23c8072962fead4e0e5f555 @jadencarver jadencarver committed Jun 27, 2016
Showing with 6 additions and 1 deletion.
  1. +6 −1 js/livereload.js.erb
@@ -507,7 +507,12 @@
};
Reloader.prototype.reloadPage = function() {
- return this.window.document.location.reload();
+ if (typeof Turbolinks === 'object') {
+ Turbolinks.enableTransitionCache();
+ return Turbolinks.visit(this.window.document.location);
+ } else {
+ return this.window.document.location.reload();
+ }
};
Reloader.prototype.reloadImages = function(path) {

0 comments on commit 559971a

Please sign in to comment.