1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-07-01 16:48:32 +00:00

Temporary change to at least let FFZ finish loading with the wrong Apollo version.

This commit is contained in:
SirStendec 2018-01-29 22:59:10 -05:00
parent 0f07ac5c5b
commit 9e1ba06eef

View file

@ -66,6 +66,11 @@ export default class Apollo extends Module {
}*/
// Register middleware so that we can intercept requests.
if ( ! this.client.networkInterface ) {
this.log.error('Apollo does not have NetworkInterface. We are unable to manipulate queries.');
return;
}
this.client.networkInterface.use([{
applyBatchMiddleware: (req, next) => {
if ( this.enabled )
@ -195,6 +200,11 @@ export default class Apollo extends Module {
query_id = name_map && name_map[operation],
query = query_map && query_map[query_id];
if ( ! query_map && ! this.warn_qm ) {
this.log.error('Unable to find the Apollo query map. We cannot access data properly.');
this.warn_qm = true;
}
return query && query.observableQuery;
}