Skip to content

Commit

Permalink
Merge pull request SheetJS#23 from phola/master
Browse files Browse the repository at this point in the history
added check for module as well as require for node environment
  • Loading branch information
SheetJSDev committed Nov 22, 2013
2 parents 8444b37 + e43cbfe commit 4fff45c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xls.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*jshint eqnull:true, funcscope:true */
var XLS = {};
(function(XLS){
if(typeof require !== 'undefined') {
if(typeof module !== "undefined" && typeof require !== 'undefined') {
if(typeof cptable === 'undefined') var cptable = require('codepage');
var current_codepage = 1252, current_cptable = cptable[1252];
}
Expand Down Expand Up @@ -823,7 +823,7 @@ function parse_PropertySetStream(file, PIDSI) {
return rval;
}
/* [MS-CFB] v20130118 */
if(typeof require !== "undefined") CFB = require('cfb');
if(typeof module !== "undefined" && typeof require !== 'undefined') CFB = require('cfb');
else var CFB = (function(){
var exports = {};
function parse(file) {
Expand Down

0 comments on commit 4fff45c

Please sign in to comment.