Skip to main content

Bug Tracker

Side navigation

#7977 closed bug (duplicate)

Opened January 14, 2011 11:00PM UTC

Closed January 14, 2011 11:52PM UTC

Last modified January 14, 2011 11:52PM UTC

Changing the Object prototype breaks $.isEmptyObject

Reported by: ljharb@gmail.com Owned by: ljharb@gmail.com
Priority: low Milestone: 1.next
Component: core Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:
Description

If you change the Object prototype, $.isEmptyObject({}) will return false - and it should always return true for an empty object literal.

This is fixed in https://github.com/jquery/jquery/pull/179

Attachments (0)
Change History (3)

Changed January 14, 2011 11:06PM UTC by rwaldron comment:1

owner: → ljharb@gmail.com
status: newpending

Take a look at this guide https://gist.github.com/672714

Please provide a reduced jsFiddle test case to help us assess your ticket!

Additionally, test against the latest jQuery release and the jQuery 0 GIT version to ensure the issue still exists.

Changed January 14, 2011 11:52PM UTC by jitter comment:2

component: unfiledcore
priority: undecidedlow
resolution: → duplicate
status: pendingclosed

I can only restate what scott.gonzal already said 3 years ago

Modifying Object.prototype is an extremely bad practice. jQuery is not supported on any page where this occurs.

But you can follow the ticket mentioned below for progress on this issue.

Changed January 14, 2011 11:52PM UTC by jitter comment:3

Duplicate of #2721.