Skip to content

Commit

Permalink
fix(getElements): tolerate foreign promises
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards1211 committed Feb 18, 2021
1 parent 402ef9f commit af53b9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/getElements.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export default async function getElements(obj, client) {
if (obj instanceof Promise) {
if (obj && typeof obj.then === 'function') {
const resolved = await obj
const selector = obj.selector || String(resolved)
if (typeof resolved === 'string') obj = resolved
Expand Down

0 comments on commit af53b9e

Please sign in to comment.