#504 ✓invalid
PATMAP

wrong if code in updateContent function!

Reported by PATMAP | December 24th, 2008 @ 09:56 PM

hello for all prototype best team

this is updateContent in prototype and i thing this line has wroge code:

if (receiver = $(receiver)) {

i thing this code must be:

if (receiver == $(receiver)) {


updateContent: function(responseText) {

var receiver = this.container[this.success() ? 'success' : 'failure'],
    options = this.options;

if (!options.evalScripts) responseText = responseText.stripScripts();

if (receiver = $(receiver)) {
  if (options.insertion) {
    if (Object.isString(options.insertion)) {
      var insertion = { }; insertion[options.insertion] = responseText;
      receiver.insert(insertion);
    }
    else options.insertion(receiver, responseText);
  }
  else receiver.update(responseText);
}

} });

best regards

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Prototype JavaScript library.

Shared Ticket Bins

People watching this ticket

Pages