Skip to content

Commit ddee876

Browse files
authored
support .native modifier for v-stream
support .native modifier for v-stream
1 parent 21b283d commit ddee876

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/directives/stream.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export default {
1010
let handle = binding.value
1111
const event = binding.arg
1212
const streamName = binding.expression
13+
const modifiers = binding.modifiers
1314

1415
if (isSubject(handle)) {
1516
handle = { subject: handle }
@@ -26,7 +27,7 @@ export default {
2627
const subject = handle.subject
2728
const next = (subject.next || subject.onNext).bind(subject)
2829

29-
if (vnode.componentInstance) {
30+
if (!modifiers.native && vnode.componentInstance) {
3031
handle.subscription = vnode.componentInstance.$eventToObservable(event).subscribe(e => {
3132
next({
3233
event: e,

0 commit comments

Comments
 (0)