Skip to content
This repository was archived by the owner on Oct 28, 2022. It is now read-only.

Commit 4f45ec8

Browse files
author
NOPR9D ☄️
authored
Merge pull request #15 from NOPR9D/20211205_fixMixins
fix: use object assign instead of assin by value
2 parents 03c1596 + 0919f49 commit 4f45ec8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/directives/stream.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export default {
6868
const handle = binding.value;
6969
const _handle = el._rxHandles && el._rxHandles[getKey(binding)];
7070
if (_handle && handle && isObserver(handle.subject)) {
71-
_handle.data = handle.data;
71+
Object.assign(_handle, handle);
7272
}
7373
},
7474

src/mixin.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Subject, Subscription, isObservable } from "rxjs";
33

44
export default {
55
created() {
6-
const vm = this;
6+
var vm = this;
77
const domStreams = vm.$options.domStreams;
88

99
if (domStreams) {
@@ -47,8 +47,8 @@ export default {
4747
vm._subscription.add(
4848
obs[key].subscribe(
4949
(value) => {
50-
vm[key] = value;
51-
vm = { ...vm };
50+
Object.assign(vm, { [key]: value });
51+
this.$forceUpdate();
5252
},
5353
(error) => {
5454
throw error;

0 commit comments

Comments
 (0)