Skip to content

Commit

Permalink
fix: not awaiting createAuthElement correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
dackmin committed Aug 9, 2023
1 parent b414d30 commit 0fed77d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Element/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ const Element = forwardRef(({
elementRef.current.destroy();
}

elementRef.current = factory.createAuthElement(type, {
factory.createAuthElement(type, {
target: containerRef.current,
styles,
...rest,
}).then(element => {
elementRef.current = element;
});

return () => {
Expand Down

0 comments on commit 0fed77d

Please sign in to comment.