From d8a15d898e371d4afe277f65e15548f1338fc797 Mon Sep 17 00:00:00 2001 From: Michael Rarela Date: Thu, 7 Sep 2017 18:08:12 -0700 Subject: [PATCH] [fastboot-fix]: Only define 'fetch' when FastBoot is available --- public/fastboot-fetch.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/fastboot-fetch.js b/public/fastboot-fetch.js index 87b1c16e..5940d79d 100644 --- a/public/fastboot-fetch.js +++ b/public/fastboot-fetch.js @@ -1,4 +1,8 @@ (function() { + if (typeof FastBoot === 'undefined' || typeof FastBoot.require === 'undefined') { + return + } + define('fetch', ['exports'], function(self) { var fetch = FastBoot.require('node-fetch'); self['default'] = fetch;