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

Fix minification issue with FilterString #825

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/client/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ Client.prototype.search = function search (base,
options.filter = filters.parseString(options.filter)
} else if (!options.filter) {
options.filter = new PresenceFilter({ attribute: 'objectclass' })
} else if (Object.prototype.toString.call(options.filter) !== '[object FilterString]') {
} else if (!(options.filter instanceof filters.FilterString)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will not work. See fastify/fastify-error#86 (comment) for why.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. And it's handled already by overwriting toStringTag (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag). Closing this.

throw new TypeError('options.filter (Filter) required')
}
if (typeof (controls) === 'function') {
Expand Down