diff --git a/lib/filters/filter.js b/lib/filters/filter.js index 4c7e4ba..612b7fd 100644 --- a/lib/filters/filter.js +++ b/lib/filters/filter.js @@ -2,14 +2,10 @@ // var assert = require('assert') -var asn1 = require('asn1') - var Protocol = require('../protocol') /// --- Globals -var BerWriter = asn1.BerWriter - var TYPES = { and: Protocol.FILTER_AND, or: Protocol.FILTER_OR, @@ -40,7 +36,7 @@ function isFilter (filter) { function mixin (target) { target.prototype.toBer = function toBer (ber) { - if (!ber || !(ber instanceof BerWriter)) { throw new TypeError('ber (BerWriter) required') } + if (!ber) { throw new TypeError('ber (BerWriter) required') } ber.startSequence(TYPES[this.type]) ber = this._toBer(ber)