From 1aeb90f5100b8e816e807e6bfed5fb6934d342b0 Mon Sep 17 00:00:00 2001 From: Bryan Joseph Date: Sun, 17 Sep 2017 20:17:36 -0500 Subject: [PATCH] Move updating of module info so we can use it for caching --- lib/elixir_script/passes/translate/module.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/elixir_script/passes/translate/module.ex b/lib/elixir_script/passes/translate/module.ex index c35341ca..0f521209 100644 --- a/lib/elixir_script/passes/translate/module.ex +++ b/lib/elixir_script/passes/translate/module.ex @@ -70,7 +70,9 @@ defmodule ElixirScript.Translate.Module do exports ) - ModuleState.put_module(pid, module, Map.put(info, :js_ast, hd(js_ast))) + info = Map.put(info, :js_ast, hd(js_ast)) + + ModuleState.put_module(pid, module, info) end end