Skip to content

Commit

Permalink
prevent secondary types from overriding the original type
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathantneal committed Aug 5, 2021
1 parent 292c7e5 commit 5ac8fe9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/features/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const createComponentFunction = (/** @type {Config} */ config, /** @type

// conditionally extend the component
if (arg[internals]) {
internal.type = arg[internals].type
if (internal.type == null) internal.type = arg[internals].type

for (const composer of arg[internals].composers) {
internal.composers.add(composer)
Expand All @@ -48,7 +48,7 @@ export const createComponentFunction = (/** @type {Config} */ config, /** @type

// otherwise, conditionally define the component type
else if (arg.constructor !== Object || arg.$$typeof) {
internal.type = arg
if (internal.type == null) internal.type = arg
}

// otherwise, add a new composer to this component
Expand Down

0 comments on commit 5ac8fe9

Please sign in to comment.