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>
18 lines
941 B
JavaScript
18 lines
941 B
JavaScript
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports["default"] = _default;
|
|
/**
|
|
* Check whether a Node is a custom property set
|
|
*
|
|
* @param {import('postcss').Rule} node
|
|
* @returns {boolean}
|
|
*/
|
|
function _default(node) {
|
|
var _node$raws, _node$raws$prop, _node$raws2, _node$raws2$value;
|
|
var prop = (node === null || node === void 0 ? void 0 : (_node$raws = node.raws) === null || _node$raws === void 0 ? void 0 : (_node$raws$prop = _node$raws.prop) === null || _node$raws$prop === void 0 ? void 0 : _node$raws$prop.raw) || node.prop;
|
|
var value = (node === null || node === void 0 ? void 0 : (_node$raws2 = node.raws) === null || _node$raws2 === void 0 ? void 0 : (_node$raws2$value = _node$raws2.value) === null || _node$raws2$value === void 0 ? void 0 : _node$raws2$value.raw) || node.value;
|
|
return node.type === "decl" && prop.startsWith("--") && value.startsWith("{") && value.endsWith("}");
|
|
} |