From 15df94ca829192f1d52796e19b6f41f599c53405 Mon Sep 17 00:00:00 2001 From: Jason Zhekov Date: Fri, 24 Jun 2016 15:14:14 +0300 Subject: [PATCH] Export all fetch types to the global object when running in snapshot --- tns-core-modules/globals/globals.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tns-core-modules/globals/globals.ts b/tns-core-modules/globals/globals.ts index 03737a50e..598b79bc0 100644 --- a/tns-core-modules/globals/globals.ts +++ b/tns-core-modules/globals/globals.ts @@ -99,6 +99,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");