Add coexistence checks to all enqueue methods to prevent loading both React and Grid.js assets simultaneously. Changes: - ReactAdmin.php: Only enqueue React assets when ?react=1 - Init.php: Skip Grid.js when React active on admin pages - Form.php, Coupon.php, Access.php: Restore classic assets when ?react=0 - Customer.php, Product.php, License.php: Add coexistence checks Now the toggle between Classic and React versions works correctly. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
27 lines
849 B
JavaScript
27 lines
849 B
JavaScript
import { a as _objectSpread2 } from '../../_rollupPluginBabelHelpers-1f0bf8c2.js';
|
|
import { toArray } from 'reakit-utils/toArray';
|
|
import { isInteger } from 'reakit-utils/isInteger';
|
|
|
|
function unstable_setIn(object, path, value) {
|
|
var _objectSpread2$1;
|
|
|
|
var pathArray = toArray(path);
|
|
var key = pathArray[0],
|
|
keys = pathArray.slice(1);
|
|
if (key == null) return object;
|
|
var obj = isInteger(key) ? object || [] : object || {};
|
|
var result = keys.length ? unstable_setIn(obj[key], keys, value) : value;
|
|
|
|
if (isInteger(key)) {
|
|
if (object) {
|
|
return [].concat(object.slice(0, Number(key)), [result], object.slice(Number(key) + 1));
|
|
}
|
|
|
|
return [result];
|
|
}
|
|
|
|
return _objectSpread2(_objectSpread2({}, object), {}, (_objectSpread2$1 = {}, _objectSpread2$1[key] = result, _objectSpread2$1));
|
|
}
|
|
|
|
export { unstable_setIn };
|