Summary:
Release Note: none
Closes https://github.com/facebook/prepack/pull/1909

Differential Revision: D7925196

Pulled By: trueadm

fbshipit-source-id: 3461e2f75f7d207e7b6e04cf9b319f15612b1945
This commit is contained in:
Bernard Lin 2018-05-09 02:46:22 -07:00 committed by Facebook Github Bot
parent 5150204d19
commit 98b78dcfba

View File

@ -48,7 +48,7 @@
<h2>Why do I get a <code>ReferenceError</code> when trying to prepack my code?</h2>
<p class="align-left">
Trying to prepack a seemlingly simple program such as <code>global.result = UnknownProperty;</code> will cause a
Trying to prepack a seemingly simple program such as <code>global.result = UnknownProperty;</code> will cause a
<code>ReferenceError</code>. The reason is that Prepack actually runs the global code, not knowing anything else
about the environment. And the semantics of JavaScript is that an unknown identifier that cannot be resolved
causes a <code>ReferenceError</code>. You might want to invest into modeling your environment.