Skip to content

Commit 071ca67

Browse files
authored
Merge pull request #89 from aratama/electron
make it work for electron
2 parents a6647bc + 4dbae82 commit 071ca67

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Network/HTTP/Affjax.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
/* global exports */
22
/* global XMLHttpRequest */
33
/* global module */
4+
/* global process */
45
"use strict";
56

67
// module Network.HTTP.Affjax
78

89
// jshint maxparams: 5
910
exports._ajax = function (mkHeader, options, canceler, errback, callback) {
1011
var platformSpecific = { };
11-
if (typeof module !== "undefined" && module.require) {
12+
if (typeof module !== "undefined" && module.require && !(typeof process !== "undefined" && process.versions["electron"])) {
1213
// We are on node.js
1314
platformSpecific.newXHR = function () {
1415
var XHR = module.require("xhr2");

0 commit comments

Comments
 (0)