Protect all Node-specific code with NODE checks
This commit is contained in:
parent
7c7473f86e
commit
b5d6afd210
49 changed files with 362 additions and 282 deletions
|
|
@ -28,11 +28,12 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
var fs = require("fs");
|
||||
var http = require("http");
|
||||
var path = require("path");
|
||||
var url = require("url");
|
||||
var Str = require("../../shared/es6/strlib");
|
||||
if (NODE) {
|
||||
var fs = require("fs");
|
||||
var http = require("http");
|
||||
var path = require("path");
|
||||
var url = require("url");
|
||||
}
|
||||
|
||||
class Net {
|
||||
/**
|
||||
|
|
@ -395,4 +396,4 @@ Net.REVEAL_PDFS = "pdfs";
|
|||
Net.asPropagate = [Net.GORT_COMMAND, "autostart"];
|
||||
Net.sServerRoot = null;
|
||||
|
||||
module.exports = Net;
|
||||
if (NODE) module.exports = Net;
|
||||
|
|
|
|||
Loading…
Reference in a new issue