From 68b65dd357b7071d4dad299ed48d9c277fc9904b Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 30 Oct 2018 14:12:41 -0600 Subject: [PATCH] Because uglify-js breaks everything --- browser-index.js | 2 +- src/http-api.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/browser-index.js b/browser-index.js index c08249231..259e02015 100644 --- a/browser-index.js +++ b/browser-index.js @@ -1,6 +1,6 @@ var matrixcs = require("./lib/matrix"); var request = require("browser-request"); -request.enableConstructionOfQueryString = true; // note: this is long so we hopefully don't collide +global.enableConstructionOfQueryString = true; // note: this is long so we hopefully don't collide matrixcs.request(request); // just *accessing* indexedDB throws an exception in firefox with diff --git a/src/http-api.js b/src/http-api.js index ab4b749ba..1c210073d 100644 --- a/src/http-api.js +++ b/src/http-api.js @@ -747,7 +747,7 @@ module.exports.MatrixHttpApi.prototype = { const reqPromise = defer.promise; try { - if (this.opts.request.enableConstructionOfQueryString) { + if (global && global.enableConstructionOfQueryString) { queryParams = queryString.stringify(queryParams, opts.qsStringifyOptions); } req = this.opts.request(