Skip to content

Commit bc0f0be

Browse files
committed
Return true in IsomorphicHelpers.load_context
1 parent 19fc204 commit bc0f0be

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

ruby/hyper-component/lib/hyperstack/component/isomorphic_helpers.rb

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,22 @@ def self.load_context(ctx, controller, name = nil)
1818
def self.load_context(unique_id = nil, name = nil)
1919
# can be called on the client to force re-initialization for testing purposes
2020
if !unique_id || !@context || @context.unique_id != unique_id
21-
if on_opal_server?
22-
`console.history = []` rescue nil
23-
message = "************************ React Prerendering Context Initialized #{name} ***********************"
24-
else
25-
message = "************************ React Browser Context Initialized ****************************"
26-
end
21+
message =
22+
if on_opal_server?
23+
`console.history = []` rescue nil
24+
"************************ React Prerendering Context Initialized #{name} ***********************"
25+
else
26+
'************************ React Browser Context Initialized ****************************'
27+
end
28+
2729
log(message)
30+
2831
@context = Context.new(unique_id)
2932
end
30-
@context
33+
34+
# True is returned here because this method is evaluated by MiniRacer,
35+
# and can cause TypeError: Converting circular structure to JSON to raise
36+
true
3137
end
3238
end
3339

0 commit comments

Comments
 (0)