Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.

Commit 3c5138d

Browse files
committed
Remove instanceof check in filter#toBer mixin
For #629
1 parent 8b70279 commit 3c5138d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/filters/filter.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,10 @@
22

33
// var assert = require('assert')
44

5-
var asn1 = require('asn1')
6-
75
var Protocol = require('../protocol')
86

97
/// --- Globals
108

11-
var BerWriter = asn1.BerWriter
12-
139
var TYPES = {
1410
and: Protocol.FILTER_AND,
1511
or: Protocol.FILTER_OR,
@@ -40,7 +36,7 @@ function isFilter (filter) {
4036

4137
function mixin (target) {
4238
target.prototype.toBer = function toBer (ber) {
43-
if (!ber || !(ber instanceof BerWriter)) { throw new TypeError('ber (BerWriter) required') }
39+
if (!ber) { throw new TypeError('ber (BerWriter) required') }
4440

4541
ber.startSequence(TYPES[this.type])
4642
ber = this._toBer(ber)

0 commit comments

Comments
 (0)