1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-29 16:43:09 +03:00

Use utils.extend instead of Object.assign

... because javascript is awful
This commit is contained in:
Richard van der Hoff
2016-10-12 15:21:47 +01:00
parent de7061184b
commit 8189c58fc3
2 changed files with 6 additions and 1 deletions

View File

@@ -18,6 +18,8 @@ limitations under the License.
/** @module interactive-auth */
var q = require("q");
var utils = require("./utils");
/**
* Abstracts the logic used to drive the interactive auth process.
*
@@ -116,7 +118,7 @@ InteractiveAuth.prototype = {
var auth = {
session: this._data.session,
};
Object.assign(auth, authData);
utils.extend(auth, authData);
this._doRequest(auth);
},

View File

@@ -337,6 +337,9 @@ var deepCompare = module.exports.deepCompare = function(x, y) {
*
* All enumerable properties, included inherited ones, are copied.
*
* This is approximately equivalent to ES6's Object.assign, except
* that the latter doesn't copy inherited properties.
*
* @param {Object} target The object that will receive new properties
* @param {...Object} source Objects from which to copy properties
*