Skip to content
This repository was archived by the owner on Oct 19, 2018. It is now read-only.

Commit 25255af

Browse files
committed
got rid of excess prerendering patches
1 parent 8cf6b09 commit 25255af

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

lib/react/isomorphic_helpers_patches.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ def self.prerender_footers(controller = nil)
1111
end
1212
end
1313
end
14-
1514
module ReactiveRuby
1615
module Rails
1716
# pass controller to the prerender_footers method

lib/react/reset_prerender_history.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module React::IsomorphicHelpers
2+
class << self
3+
alias pre_history_patch_load_context load_context
4+
def load_context(unique_id = nil, name = nil)
5+
`console.history = []` if (!unique_id || !@context || @context.unique_id != unique_id) && on_opal_server?
6+
pre_history_patch_load_context(unique_id, name)
7+
end
8+
end
9+
end if RUBY_ENGINE == 'opal'

lib/synchromesh.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
require 'set'
1414
if RUBY_ENGINE == 'opal'
1515
#require 'reactive-record'
16+
require_relative 'react/reset_prerender_history'
1617
require_relative 'synchromesh/version'
1718
require_relative 'json/parse_patch'
1819
require_relative 'opal/set_patches'

0 commit comments

Comments
 (0)