piral-core
Advanced tools
Comparing version 0.8.0 to 0.8.1-pre.694
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
function isNotExotic(component) { | ||
return !component.$$typeof; | ||
} | ||
function markReact(arg, displayName) { | ||
@@ -10,3 +13,3 @@ if (arg && !arg.displayName) { | ||
function convertComponent(converters, component, displayName) { | ||
if (typeof component === 'object') { | ||
if (typeof component === 'object' && isNotExotic(component)) { | ||
const converter = converters[component.type]; | ||
@@ -13,0 +16,0 @@ if (typeof converter !== 'function') { |
{ | ||
"name": "piral-core", | ||
"version": "0.8.0", | ||
"version": "0.8.1-pre.694", | ||
"description": "The core library for creating a Piral instance.", | ||
@@ -54,3 +54,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "57dd5aff0ba728c60757a37f9072952d04795fb2" | ||
"gitHead": "6dc0fb0d63771173d10558d61008adc72a829eaa" | ||
} |
@@ -1,4 +0,8 @@ | ||
import { ComponentType } from 'react'; | ||
import { ComponentType, ExoticComponent } from 'react'; | ||
import { AnyComponent, ComponentConverters } from '../types'; | ||
function isNotExotic(component: any): component is object { | ||
return !(component as ExoticComponent).$$typeof; | ||
} | ||
export function markReact<T>(arg: ComponentType<T>, displayName: string) { | ||
@@ -15,3 +19,3 @@ if (arg && !arg.displayName) { | ||
) { | ||
if (typeof component === 'object') { | ||
if (typeof component === 'object' && isNotExotic(component)) { | ||
const converter = converters[component.type]; | ||
@@ -18,0 +22,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
275893
307
6369