Bug Tracker

Modify

Ticket #10749 (closed bug: duplicate)

Opened 2 years ago

Last modified 2 years ago

.text(null) breaks chaining

Reported by: anonymous Owned by: anonymous
Priority: undecided Milestone: None
Component: unfiled Version: 1.6.4
Keywords: Cc:
Blocking: Blocked by:

Description

Calling text on an element with null as the argument breaks chaining. See:  http://jsfiddle.net/GGSNE/1/

Change History

comment:1 Changed 2 years ago by dmethvin

  • Owner set to anonymous
  • Status changed from new to pending

I'm not a Javascript engine, admittedly, but null doesn't look like a string to me so it seems like it's inappropriate to pass there. What would be your desired outcome?

comment:2 Changed 2 years ago by anonymous

  • Status changed from pending to new

I only came across this as I was adding numerical data to a table. In the data null is used to indicate no value. I'm not sure what should happen in terms of actually setting the text. I guess either nothing at all, or the same as passing undefined or an empty string. My problem was that it unexpected broke chaining.

comment:3 Changed 2 years ago by rwaldron

  • Status changed from new to closed
  • Resolution set to duplicate

comment:4 Changed 2 years ago by rwaldron

Duplicate of #9427.

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.