Skip to content

Commit feb241c

Browse files
committed
fix(engine-core): use propertyIsEnumerable from @lwc/shared
1 parent e7ecf15 commit feb241c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/@lwc/engine-core/src/framework/modules/dynamic-events.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* SPDX-License-Identifier: MIT
55
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
66
*/
7-
import { isUndefined, isNull, keys } from '@lwc/shared';
7+
import { isUndefined, isNull, keys, propertyIsEnumerable } from '@lwc/shared';
88
import { EmptyObject } from '../utils';
99
import { invokeEventListener } from '../invoker';
1010
import type { VM } from '../vm';
@@ -39,15 +39,15 @@ export function patchDynamicEventListeners(
3939
const newDynamicOnNames = keys(newDynamicOn);
4040

4141
for (const name of oldDynamicOnNames) {
42-
if (!Object.prototype.propertyIsEnumerable.call(newDynamicOn, name)) {
42+
if (!propertyIsEnumerable.call(newDynamicOn, name)) {
4343
const actualListener = actualEventListeners[name];
4444
removeEventListener(elm, name, actualListener);
4545
delete actualEventListeners[name];
4646
}
4747
}
4848

4949
for (const name of newDynamicOnNames) {
50-
const oldHandler = Object.prototype.propertyIsEnumerable.call(oldDynamicOn, name)
50+
const oldHandler = propertyIsEnumerable.call(oldDynamicOn, name)
5151
? oldDynamicOn[name]
5252
: null;
5353
const newHandler = newDynamicOn[name];

0 commit comments

Comments
 (0)