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>
25 lines
864 B
JavaScript
25 lines
864 B
JavaScript
'use strict';
|
|
/* eslint-disable es/no-object-getownpropertynames -- safe */
|
|
var classof = require('../internals/classof-raw');
|
|
var toIndexedObject = require('../internals/to-indexed-object');
|
|
var $getOwnPropertyNames = require('../internals/object-get-own-property-names').f;
|
|
var arraySlice = require('../internals/array-slice');
|
|
|
|
var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
|
|
? Object.getOwnPropertyNames(window) : [];
|
|
|
|
var getWindowNames = function (it) {
|
|
try {
|
|
return $getOwnPropertyNames(it);
|
|
} catch (error) {
|
|
return arraySlice(windowNames);
|
|
}
|
|
};
|
|
|
|
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
|
|
module.exports.f = function getOwnPropertyNames(it) {
|
|
return windowNames && classof(it) === 'Window'
|
|
? getWindowNames(it)
|
|
: $getOwnPropertyNames(toIndexedObject(it));
|
|
};
|