Skip to content

Commit 98df59d

Browse files
committed
fix: replace direct hasOwnProperty call with Object.prototype.hasOwnProperty.call
- Resolves ESLint error: Do not access Object.prototype method 'hasOwnProperty' from target object - Uses safer Object.prototype.hasOwnProperty.call() pattern to avoid prototype pollution issues - Maintains same test functionality while following ESLint no-prototype-builtins rule
1 parent ffe4c4f commit 98df59d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/agents-realtime/test/realtimeSession.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ describe('RealtimeSession', () => {
494494
// Check that updateSessionConfig calls do not include tools field
495495
expect(transport.updateSessionConfigCalls.length).toBeGreaterThan(0);
496496
const lastUpdateCall = transport.updateSessionConfigCalls[transport.updateSessionConfigCalls.length - 1];
497-
expect(lastUpdateCall.hasOwnProperty('tools')).toBe(false);
497+
expect(Object.prototype.hasOwnProperty.call(lastUpdateCall, 'tools')).toBe(false);
498498
});
499499

500500
it('reproduces the original issue - tools work with config provided', async () => {

0 commit comments

Comments
 (0)