Bug Tracker

Modify

Ticket #1434 (closed bug: worksforme)

Opened 7 years ago

Last modified 7 years ago

no check if Property className exists

Reported by: naish Owned by:
Priority: major Milestone: 1.1.4
Component: core Version: 1.1.3
Keywords: css removeClass Cc:
Blocking: Blocked by:

Description

in function "remove" I had the error "error: elem.className has no properties" so I added the line:

if(!elem.className)return;

into the function:

remove: function( elem, c ){

if(!elem.className)return;

elem.className = c != undefined ? jQuery.grep( elem.className.split(/\s+/), function(cur){

return !jQuery.className.has( c, cur );

}).join(" ") : "";

},

I couldnot reproduce the Error, but using that Change helped.

Change History

comment:1 Changed 7 years ago by brandon

  • need changed from Review to Test Case
  • Status changed from new to closed
  • Resolution set to worksforme

I can't seem to reproduce this. Please feel free to reopen with a test case.

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.