From 3f5648add2ed759aabb3bd1199ed7d8f0bed18ad Mon Sep 17 00:00:00 2001 From: Sharat M R Date: Thu, 11 Jan 2018 22:26:13 +0530 Subject: [PATCH] memoize only when the computed value is not null --- lib/android.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/android.js b/lib/android.js index 39a6ee26..76355b9d 100644 --- a/lib/android.js +++ b/lib/android.js @@ -612,9 +612,10 @@ function memoize (compute) { return function (...args) { if (!computed) { value = compute(...args); - computed = true; + if(value != null) { + computed = true; + } } - return value; }; }