rxjs-ws-channels-filters
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -134,5 +134,6 @@ 'use strict'; | ||
filterSub = { | ||
observable: createNewFilterObservable(channelSub, filter), | ||
filter: filter | ||
} | ||
}; | ||
filterSub.observable = createNewFilterObservable(channelSub, filter, filterSub); | ||
channelSub.filters.push(filterSub); | ||
} | ||
@@ -162,5 +163,4 @@ return filterSub; | ||
function createNewFilterObservable(channelSub, filter) { | ||
function createNewFilterObservable(channelSub, filter, filterSub) { | ||
return new Rx.Observable.create(function (observer) { | ||
channelSub.filters.push(filter); | ||
if (channelSub.initialized) { | ||
@@ -171,3 +171,3 @@ changeChannelFilters(channelSub.name, vm.connection.options.filterJoinAction, filter); | ||
return function () { | ||
channelSub.filters.splice(channelSub.filters.indexOf(filter), 1); | ||
channelSub.filters.splice(channelSub.filters.indexOf(filterSub), 1); | ||
if (channelSub.initialized) { | ||
@@ -184,6 +184,6 @@ changeChannelFilters(channelSub.name, vm.connection.options.filterLeaveAction, filter); | ||
.filters | ||
.map(function (filter) { | ||
.map(function (filterSub) { | ||
return { | ||
action: vm.connection.options.filterJoinAction, | ||
filter: filter | ||
filter: filterSub.filter | ||
}; | ||
@@ -190,0 +190,0 @@ }); |
{ | ||
"name": "rxjs-ws-channels-filters", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "RxJS websockets implementation with channels and filters", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15693