pagekit / vue-resource

The HTTP client for Vue.js
MIT License
10.08k stars 1.6k forks source link

IE11 issue with executor.bind #720

Open w3q opened 5 years ago

w3q commented 5 years ago

Reproduction Link

https://jsfiddle.net/f71oh0sb/1/

Steps to reproduce

Im using IE11 on WIn10 in VirtualBox. Vue-resource is version 1.5.1. Vue: 2.5.17

What is Expected?

executor.bind should be defined as a function

What is actually happening?

When i call this.$http.get, it will fire a request. It goes trough some internals and it will end up in this part.

`function PromiseObj(executor, context) {

if (executor instanceof Promise) {
    this.promise = executor;
} else {
    this.promise = new Promise(executor.bind(context));
}

this.context = context;

}`

This function is ran multiple times, usually working good, but on third time the executor does not have .bind function and the app will fail. This is only happening in IE11, Firefox, Safari and Chrome works well.

typeof executor returns object.

See screenshots attached

bildschirmfoto 2019-02-01 um 15 56 45 bildschirmfoto 2019-02-01 um 15 57 01