Make WordPress Core

Changeset 9483


Ignore:
Timestamp:
11/03/2008 12:14:49 AM (16 years ago)
Author:
azaozz
Message:

Fix js error on dashboard when no comments in Recent Comments module

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/quicktags.js

    r8720 r9483  
    394394// Can disable some buttons by passing comma delimited string as 4th param.
    395395var QTags = function(name, id, container, disabled) {
    396     var t = this;
     396    var t = this, cont = document.getElementById(container);
    397397
    398398    t.Buttons = [];
     
    400400    t.OpenTags = [];
    401401    t.Canvas = document.getElementById(id);
     402   
     403    if ( ! t.Canvas || ! cont )
     404        return;
    402405
    403406    disabled = ( typeof disabled != 'undefined' ) ? ','+disabled+',' : '';
     
    575578
    576579    tb.innerHTML = html;
    577     var cont = document.getElementById(container);
    578580    cont.parentNode.insertBefore(tb, cont);
    579581
Note: See TracChangeset for help on using the changeset viewer.