This is an automated email from the ASF dual-hosted git repository.

davisp pushed a commit to reference refs/pull/241/head
in repository https://gitbox.apache.org/repos/asf/couchdb-escodegen.git

commit 7f041e07a76c1dcd8547f5bf63fd8f2d4abcacad
Author: ChiChou <[email protected]>
AuthorDate: Wed Jul 22 22:27:41 2015 +0800

    fix unhandled undefined pattern literal
    RegExp pattern literal may be undefined, leading app crashes in 
generateRegExp()
---
 escodegen.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/escodegen.js b/escodegen.js
index f706c05..9d21ad7 100644
--- a/escodegen.js
+++ b/escodegen.js
@@ -2270,7 +2270,7 @@
                 }
             }
 
-            if (expr.value === null) {
+            if (typeof expr.value === 'undefined' || expr.value === null) {
                 return 'null';
             }
 

Reply via email to