Skip to content

Commit

Permalink
Fix jquery4 deprecations (#610)
Browse files Browse the repository at this point in the history
  • Loading branch information
barryvdh authored Mar 1, 2024
1 parent d420dd0 commit 9700e50
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/DebugBar/Resources/debugbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ if (typeof(PhpDebugBar) == 'undefined') {
* @param {Function} cb
*/
bindAttr: function(attr, cb) {
if ($.isArray(attr)) {
if (Array.isArray(attr)) {
for (var i = 0, c = attr.length; i < c; i++) {
this.bindAttr(attr[i], cb);
}
Expand Down Expand Up @@ -1227,7 +1227,7 @@ if (typeof(PhpDebugBar) == 'undefined') {
this.addEventListener("readystatechange", function() {
var skipUrl = self.debugbar.openHandler ? self.debugbar.openHandler.get('url') : null;
var href = (typeof url === 'string') ? url : url.href;

if (xhr.readyState == 4 && href.indexOf(skipUrl) !== 0) {
self.handle(xhr);
}
Expand Down
2 changes: 1 addition & 1 deletion src/DebugBar/Resources/widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ if (typeof(PhpDebugBar) == 'undefined') {
highlight(codeElement).removeClass('hljs');

// Show line numbers in a list
if ($.isNumeric(firstLineNumber)) {
if (!isNaN(parseFloat(firstLineNumber))) {
var lineCount = code.split('\n').length;
var $lineNumbers = $('<ul />').prependTo(pre);
pre.children().addClass(csscls('numbered-code'));
Expand Down

0 comments on commit 9700e50

Please sign in to comment.