From 35861120e12c8a3f9fb1b861e5e5ff1a99c7a548 Mon Sep 17 00:00:00 2001 From: Daniel Shiffman Date: Fri, 2 Feb 2018 13:25:21 -0500 Subject: [PATCH] checking if node environment for module --- matrix.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/matrix.js b/matrix.js index 8ccd4c9..af456cb 100644 --- a/matrix.js +++ b/matrix.js @@ -140,9 +140,9 @@ class Matrix { print() { console.table(this.data); } - - } -module.exports = Matrix; +if (typeof module !== 'undefined') { + module.exports = Matrix; +}