Skip to content

Commit

Permalink
fix(wire-service): does not accept adapter id to be a symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
caridy committed Aug 30, 2019
1 parent 91c2d97 commit fb136b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@lwc/wire-service/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export function register(
adapterId: any,
adapterEventTargetCallback: (eventTarget: WireEventTarget) => void
) {
if (!adapterId) {
new TypeError('adapter id must be truthy');
if (adapterId == null || !(adapterId instanceof Object)) {
new TypeError('adapter id must be an object or a function');
}
if (typeof adapterEventTargetCallback !== 'function') {
new TypeError('adapter factory must be a callable');
Expand Down

0 comments on commit fb136b7

Please sign in to comment.