mirror of
https://github.com/withastro/astro.git
synced 2025-02-17 22:44:24 -05:00
[ci] format
This commit is contained in:
parent
72b26daf69
commit
60dc8da71b
4 changed files with 4 additions and 4 deletions
|
@ -13,7 +13,7 @@ let consoleFilterRefs = 0;
|
|||
|
||||
function check(this: RendererContext, Component: any, props: Record<string, any>, children: any) {
|
||||
if (typeof Component !== 'function') return false;
|
||||
if (Component.name === "QwikComponent") return false;
|
||||
if (Component.name === 'QwikComponent') return false;
|
||||
|
||||
if (Component.prototype != null && typeof Component.prototype.render === 'function') {
|
||||
return BaseComponent.isPrototypeOf(Component);
|
||||
|
|
|
@ -20,7 +20,7 @@ function check(Component, props, children) {
|
|||
return Component['$$typeof']?.toString().slice('Symbol('.length).startsWith('react');
|
||||
}
|
||||
if (typeof Component !== 'function') return false;
|
||||
if (Component.name === "QwikComponent") return false;
|
||||
if (Component.name === 'QwikComponent') return false;
|
||||
|
||||
if (Component.prototype != null && typeof Component.prototype.render === 'function') {
|
||||
return React.Component.isPrototypeOf(Component) || React.PureComponent.isPrototypeOf(Component);
|
||||
|
|
|
@ -22,7 +22,7 @@ async function check(Component, props, children) {
|
|||
return Component['$$typeof'].toString().slice('Symbol('.length).startsWith('react');
|
||||
}
|
||||
if (typeof Component !== 'function') return false;
|
||||
if (Component.name === "QwikComponent") return false;
|
||||
if (Component.name === 'QwikComponent') return false;
|
||||
|
||||
// Preact forwarded-ref components can be functions, which React does not support
|
||||
if (typeof Component === 'function' && Component['$$typeof'] === Symbol.for('react.forward_ref'))
|
||||
|
|
|
@ -6,7 +6,7 @@ const slotName = (str: string) => str.trim().replace(/[-_]([a-z])/g, (_, w) => w
|
|||
|
||||
function check(this: RendererContext, Component: any, props: Record<string, any>, children: any) {
|
||||
if (typeof Component !== 'function') return false;
|
||||
if (Component.name === "QwikComponent") return false;
|
||||
if (Component.name === 'QwikComponent') return false;
|
||||
const { html } = renderToStaticMarkup.call(this, Component, props, children);
|
||||
return typeof html === 'string';
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue