Bug Tracker

Modify

Ticket #7413 (closed bug: invalid)

Opened 3 years ago

Last modified 3 years ago

Browser inconsistencies return of jQuery.isEmptyObject

Reported by: rfernandes@… Owned by: rwaldron
Priority: low Milestone: 1.next
Component: core Version: 1.6b1
Keywords: Cc:
Blocking: Blocked by:

Description (last modified by snover) (diff)

  • Firefox 3.6 (and 4b7) returns:

jQuery.isEmptyObject("test") // false

  • IE7 returns:

jQuery.isEmptyObject("test") // true

Did not test other browsers or versions but can test if requested

As normal IE is the suspect here...

Change History

comment:1 Changed 3 years ago by rwaldron

  • Owner set to rwaldron
  • Status changed from new to assigned

Confirmed!

comment:3 Changed 3 years ago by snover

  • Description modified (diff)

comment:5 Changed 3 years ago by john

  • Owner changed from rwaldron to john
  • Milestone changed from 1.5 to 1.4.5

Let's tackle this in 1.4.5 and use hasOwnProperty.

comment:6 Changed 3 years ago by john

  • Priority changed from undecided to low
  • Resolution set to fixed
  • Status changed from assigned to closed
  • Component changed from unfiled to core
  • Version changed from 1.4.3 to 1.4.4

Landed.

comment:7 Changed 3 years ago by john

  • Status changed from closed to reopened
  • Resolution fixed deleted

The patch causing problems in jQuery.param, backed out.

comment:8 Changed 3 years ago by snover

  • Owner changed from john to rwaldron
  • Status changed from reopened to assigned

comment:9 Changed 3 years ago by dmethvin

  • Milestone changed from 1.4.5 to 1.5

comment:10 Changed 3 years ago by timmywil

  • Version changed from 1.4.4 to 1.6b1
  • Milestone set to 1.6

Confirmed this bug is still present in 1.6b1.  http://jsfiddle.net/timmywil/Q9nUZ/

comment:11 Changed 3 years ago by john

  • Milestone changed from 1.6 to 1.next

comment:13 Changed 3 years ago by rwaldron

  • Keywords needsdocs added
  • Status changed from assigned to closed
  • Resolution set to invalid

Best patch ever === no patch at all.

comment:14 Changed 3 years ago by addyosmani

  • Keywords needsdocs removed

Docs updated to emphasize $.isEmptyObject should always be called with a real object.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.