Файловый менеджер - Редактировать - /home/freeclou/app.optimyar.com/backend/node_modules/react-dnd/dist/esm/utils/cloneWithRef.js
Назад
import { cloneElement } from 'react'; import { invariant } from '@react-dnd/invariant'; function setRef(ref, node) { if (typeof ref === 'function') { ref(node); } else { ref.current = node; } } export function cloneWithRef(element, newRef) { var previousRef = element.ref; invariant(typeof previousRef !== 'string', 'Cannot connect React DnD to an element with an existing string ref. ' + 'Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. ' + 'Read more: https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute'); if (!previousRef) { // When there is no ref on the element, use the new ref directly return cloneElement(element, { ref: newRef }); } else { return cloneElement(element, { ref: function ref(node) { setRef(previousRef, node); setRef(newRef, node); } }); } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка