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>
32 lines
861 B
JavaScript
32 lines
861 B
JavaScript
'use strict';
|
|
var fails = require('../internals/fails');
|
|
var globalThis = require('../internals/global-this');
|
|
|
|
// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
|
var $RegExp = globalThis.RegExp;
|
|
|
|
var UNSUPPORTED_Y = fails(function () {
|
|
var re = $RegExp('a', 'y');
|
|
re.lastIndex = 2;
|
|
return re.exec('abcd') !== null;
|
|
});
|
|
|
|
// UC Browser bug
|
|
// https://github.com/zloirock/core-js/issues/1008
|
|
var MISSED_STICKY = UNSUPPORTED_Y || fails(function () {
|
|
return !$RegExp('a', 'y').sticky;
|
|
});
|
|
|
|
var BROKEN_CARET = UNSUPPORTED_Y || fails(function () {
|
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
|
var re = $RegExp('^r', 'gy');
|
|
re.lastIndex = 2;
|
|
return re.exec('str') !== null;
|
|
});
|
|
|
|
module.exports = {
|
|
BROKEN_CARET: BROKEN_CARET,
|
|
MISSED_STICKY: MISSED_STICKY,
|
|
UNSUPPORTED_Y: UNSUPPORTED_Y
|
|
};
|