Hello there,
I apologise if this is not the right place for this issue, but I'm not sure what else to do, I'm asking here because the error happens in apollo-angular's code.
I'm using apollo-angular in my Ionic app, and it works fine on Browser and iOS platforms, but in Android I get this error:
Error: Network error: Object [object Array] has no method 'includes'
The request to the server goes through just fine, this error when it gets the response back.
This is the relevant code:
private currentUser(cb) {
this.apollo.query({
query: gql`${this.currentUserQuery()}`
}).subscribe(
(res:any) => cb(res.data.user),
(data) => this.error = data
);
}
I've tried to include Array.prototype.includes to my .tsconfig.json, but without success.
I've also tried to use es7 in a lot of ways by modifying .tsconfig.json, also without success.
Searching in this project, I'm only able to find this instance of .includes.
Does anyone have any input that could help me get through this?
fwiw this is my .tsconfig.json
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"dom",
"es2015"
],
"module": "es2015",
"moduleResolution": "node",
"sourceMap": true,
"target": "es5",
"typeRoots": [
"../node_modules/@types"
]
},
"include": [
"src/**/*.ts"
],
"exclude": [
"node_modules",
"src/**/*.spec.ts",
"src/**/__tests__/*.ts"
],
"compileOnSave": false,
"atom": {
"rewriteTsconfig": false
}
}
It seems like we use Array.includes in apollo-angular-link-http. I'm going to change it in a minute.
Most helpful comment
It seems like we use
Array.includesinapollo-angular-link-http. I'm going to change it in a minute.