Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
Duck-type instead of instanceof to fox site on Firefox.
Browse files Browse the repository at this point in the history
  • Loading branch information
ericsoco committed Sep 23, 2016
1 parent 0b2a481 commit dfd4dbc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/models/transport.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ export default function (options) {
requestOptions.method === 'DELETE' ||
requestOptions.method === 'PATCH';

if (returnVal instanceof Promise) {
// duck-type instead of instanceof, to avoid problems with polyfills
if (returnVal.then) {

// fetching; return fetch+parse Promise chain
return returnVal
Expand Down

0 comments on commit dfd4dbc

Please sign in to comment.