From 02a0510c7b75790c7833a402101e22ec0ebd4801 Mon Sep 17 00:00:00 2001 From: phola Date: Fri, 22 Nov 2013 16:24:55 +0000 Subject: [PATCH] added check for module as well as require for node environment see PR : https://github.com/SheetJS/js-xls/pull/23 --- xlsx.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xlsx.js b/xlsx.js index 5134635..bd77f1b 100644 --- a/xlsx.js +++ b/xlsx.js @@ -2,7 +2,7 @@ /* vim: set ts=2: */ /*jshint eqnull:true */ /* Spreadsheet Format -- jump to XLSX for the XLSX code */ -if(typeof require !== "undefined") SSF = require('ssf'); +if(typeof module !== "undefined" && typeof require !== 'undefined') SSF = require('ssf'); var SSF = (function() { var SSF = {}; String.prototype.reverse=function(){return this.split("").reverse().join("");};