feat(package): add umd version

This commit is contained in:
moklick
2022-03-30 18:20:43 +02:00
parent 8f871827f5
commit fc9cf9604c
6 changed files with 398 additions and 101 deletions
+1 -6
View File
@@ -38,12 +38,7 @@ export default ({
const { nodeInternals, transform } = useStore(selector, shallow);
const fromNode = useRef<Node | undefined>(nodeInternals.get(nodeId));
if (
!fromNode.current ||
!fromNode.current ||
!isConnectable ||
!fromNode.current.handleBounds?.[connectionHandleType]
) {
if (!fromNode.current || !isConnectable || !fromNode.current.handleBounds?.[connectionHandleType]) {
return null;
}
+1
View File
@@ -11,6 +11,7 @@ export function useNodeOrEdgeTypes(nodeOrEdgeTypes: any, createTypes: any): any
const typesKeysRef = useRef<string[] | null>(null);
const typesParsed = useMemo(() => {
// @ts-ignore
if (process.env.NODE_ENV === 'development') {
const typeKeys = Object.keys(nodeOrEdgeTypes);
if (shallow(typesKeysRef.current, typeKeys)) {