Skip to content

Commit

Permalink
fix(defmulti): add DEFAULT handling for .addAll()
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Sep 29, 2021
1 parent f8725ff commit 40ba6f9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/defmulti/src/defmulti.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ export function defmulti<T>(
for (let id in _impls) {
ok = fn.add(id, _impls[id]) && ok;
}
DEFAULT in _impls && fn.setDefault(_impls[<any>DEFAULT]);
return ok;
};
fn.setDefault = (impl: Implementation<T>) => fn.add(DEFAULT, impl);
Expand Down

0 comments on commit 40ba6f9

Please sign in to comment.