1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-01-17 13:28:35 +01:00

Fix jquery4 deprecations (#610)

This commit is contained in:
Barry vd. Heuvel 2024-03-01 16:28:34 +01:00 committed by GitHub
parent d420dd09d1
commit 9700e50974
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -186,7 +186,7 @@ if (typeof(PhpDebugBar) == 'undefined') {
* @param {Function} cb * @param {Function} cb
*/ */
bindAttr: function(attr, cb) { bindAttr: function(attr, cb) {
if ($.isArray(attr)) { if (Array.isArray(attr)) {
for (var i = 0, c = attr.length; i < c; i++) { for (var i = 0, c = attr.length; i < c; i++) {
this.bindAttr(attr[i], cb); this.bindAttr(attr[i], cb);
} }

View File

@ -88,7 +88,7 @@ if (typeof(PhpDebugBar) == 'undefined') {
highlight(codeElement).removeClass('hljs'); highlight(codeElement).removeClass('hljs');
// Show line numbers in a list // Show line numbers in a list
if ($.isNumeric(firstLineNumber)) { if (!isNaN(parseFloat(firstLineNumber))) {
var lineCount = code.split('\n').length; var lineCount = code.split('\n').length;
var $lineNumbers = $('<ul />').prependTo(pre); var $lineNumbers = $('<ul />').prependTo(pre);
pre.children().addClass(csscls('numbered-code')); pre.children().addClass(csscls('numbered-code'));