Export all fetch types to the global object when running in snapshot

This commit is contained in:
Jason Zhekov
2016-06-24 15:14:14 +03:00
parent 4af963f7e1
commit c2b984664c

View File

@@ -101,6 +101,9 @@ if (global.__snapshot) {
var fetch = require("fetch");
global.fetch = fetch.fetch;
global.Headers = fetch.Headers;
global.Request = fetch.Request;
global.Response = fetch.Response;
} else {
registerOnGlobalContext("setTimeout", "timer");
registerOnGlobalContext("clearTimeout", "timer");