Skip to content

Commit 1997836

Browse files
committed
fix: replace Object.assign with _.extend
1 parent c34d679 commit 1997836

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/captcha.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
const _ = require('underscore');
12
const { tap } = require('./utils');
23

34
module.exports = (AV) => {
@@ -43,7 +44,7 @@ module.exports = (AV) => {
4344
return AV.Cloud._requestCaptcha(this._options, this._authOptions).then(({
4445
captchaToken, url,
4546
}) => {
46-
Object.assign(this, { captchaToken, url });
47+
_.extend(this, { captchaToken, url });
4748
return url;
4849
});
4950
};

src/live-query.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
const _ = require('underscore');
12
const EventEmitter = require('eventemitter3');
23
const Promise = require('./promise');
34
const { inherits } = require('./utils');
@@ -25,7 +26,7 @@ module.exports = (AV) => {
2526
updatedKeys,
2627
}) => {
2728
if (queryId !== this.id) return;
28-
const target = AV.parseJSON(Object.assign({
29+
const target = AV.parseJSON(_.extend({
2930
__type: object.className === '_File' ? 'File' : 'Object',
3031
}, object));
3132
if (updatedKeys) {

0 commit comments

Comments
 (0)