From b8faaa23c12003c174631ebd01a403a0b1af64e1 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 16 Dec 2019 16:06:43 -0700 Subject: [PATCH 1/2] Remove irrelevant targets --- .babelrc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.babelrc b/.babelrc index 3710e20a37..7e50f4a757 100644 --- a/.babelrc +++ b/.babelrc @@ -5,8 +5,7 @@ "targets": { "browsers": [ "last 2 versions" - ], - "node": 12 + ] }, "modules": "commonjs" }], From 434570eca962d5894627a3acb799ff618cdc61b0 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 16 Dec 2019 16:07:58 -0700 Subject: [PATCH 2/2] Explain why MatrixClientPeg is the way it is --- src/MatrixClientPeg.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/MatrixClientPeg.js b/src/MatrixClientPeg.js index 4d293b7e34..46debab731 100644 --- a/src/MatrixClientPeg.js +++ b/src/MatrixClientPeg.js @@ -247,5 +247,10 @@ class _MatrixClientPeg { if (!global.mxMatrixClientPeg) { global.mxMatrixClientPeg = new _MatrixClientPeg(); } + +// We export both because the syntax is slightly different with +// our babel changes. We maintain both for backwards compatibility +// and for babel to be happy. +// TODO: Convert this to a single export export default global.mxMatrixClientPeg; export const MatrixClientPeg = global.mxMatrixClientPeg;