1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-02-04 19:16:07 +02:00
2017-07-06 19:29:09 +00:00

16 lines
341 B
JavaScript

let shim = {};
shim.fetch = typeof fetch !== 'undefined' ? fetch : null;
shim.FormData = typeof FormData !== 'undefined' ? FormData : null;
if (!shim.fetch) {
let moduleName = 'node-fetch';
shim.fetch = require(moduleName);
}
if (!shim.FormData) {
let moduleName = 'form-data';
shim.FormData = require(moduleName);
}
export { shim };