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>
20 lines
779 B
JavaScript
20 lines
779 B
JavaScript
'use strict';
|
|
|
|
var GetIntrinsic = require('get-intrinsic');
|
|
|
|
var $TypeError = require('es-errors/type');
|
|
var $fromCharCode = GetIntrinsic('%String.fromCharCode%');
|
|
|
|
var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');
|
|
var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');
|
|
|
|
// https://262.ecma-international.org/12.0/#sec-utf16decodesurrogatepair
|
|
|
|
module.exports = function UTF16SurrogatePairToCodePoint(lead, trail) {
|
|
if (!isLeadingSurrogate(lead) || !isTrailingSurrogate(trail)) {
|
|
throw new $TypeError('Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code');
|
|
}
|
|
// var cp = (lead - 0xD800) * 0x400 + (trail - 0xDC00) + 0x10000;
|
|
return $fromCharCode(lead) + $fromCharCode(trail);
|
|
};
|