MM-61893 Replace usage of hasOwnProperty with Object.hasOwn (#29428)
* MM-61893 Replace usage of hasOwnProperty with Object.hasOwn * Update type guard in messageToElement * Replace a couple more hasOwnProperty calls
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
3ed209a34d
Коммит
8533350a91
@@ -146,7 +146,7 @@ const expectConfigToBeUpdatable = (currentConfig, newConfig) => {
|
||||
|
||||
if (setting) {
|
||||
Object.keys(newSubSetting).forEach((newSubKey) => {
|
||||
const isAvailable = setting.hasOwnProperty(newSubKey);
|
||||
const isAvailable = Object.hasOwn(setting, newSubKey);
|
||||
const name = `${newMainKey}.${newSubKey}`;
|
||||
expect(isAvailable, isAvailable ? `${name} setting can be updated.` : errorMessage(name)).to.equal(true);
|
||||
});
|
||||
|
||||
Ссылка в новой задаче
Block a user