Skip to content

Commit

Permalink
[fastboot-fix]: Only define 'fetch' when FastBoot is available
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Rarela committed Sep 8, 2017
1 parent 0bc08d0 commit d8a15d8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions public/fastboot-fetch.js
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit d8a15d8

Please sign in to comment.