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
@@ -235,7 +235,7 @@ export async function loadPluginsIfNecessary() {
|
||||
|
||||
// Remove old plugins
|
||||
Object.keys(oldManifests).forEach((id) => {
|
||||
if (!newManifests.hasOwnProperty(id)) {
|
||||
if (!Object.hasOwn(newManifests, id)) {
|
||||
const oldManifest = oldManifests[id];
|
||||
removePlugin(oldManifest);
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ export default function Pluggable(props: Props): JSX.Element | null {
|
||||
...otherProps
|
||||
} = props;
|
||||
|
||||
if (!pluggableName || !Object.hasOwnProperty.call(components, pluggableName)) {
|
||||
if (!pluggableName || !Object.hasOwn(components, pluggableName)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user