From db82c3f3c4948d9e41bd66132cb14c0f7256515b Mon Sep 17 00:00:00 2001 From: 59naga Date: Wed, 15 Aug 2018 04:57:56 +0900 Subject: [PATCH] fix: closes #60, #63 --- src/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 36fb125..3bbf650 100644 --- a/src/index.js +++ b/src/index.js @@ -71,7 +71,11 @@ class ExportsFinder { findExports(path, property = 'expression') { // Not `exports.anything`, skip - if (!path.get(`${property}.left`).node || !path.get(`${property}.left.object`).node) { + if ( + !path.get(`${property}`).node || + !path.get(`${property}.left`).node || + !path.get(`${property}.left.object`).node + ) { return }