This commit is contained in:
Brian Ng
2019-11-16 09:05:40 -06:00
committed by Nicolò Ribaudo
parent f087cf842f
commit c37361ba2e
11 changed files with 77 additions and 86 deletions

View File

@@ -59,7 +59,8 @@ export default declare((api, options) => {
const { value } = expressionResult;
const isMutable =
(!state.mutablePropsAllowed &&
(value && typeof value === "object")) ||
value &&
typeof value === "object") ||
typeof value === "function";
if (!isMutable) {
// It evaluated to an immutable value, so we can hoist it.