Skip to content

Commit 119ae50

Browse files
drewmbarryvdh
authored andcommitted
Check that xdebug_link isn't null (php-debugbar#377)
Sometimes `tpl.xdebug_link` is defined, but has a null value, which causes a check for `.ajax` to throw an error.
1 parent 30e7d60 commit 119ae50

File tree

1 file changed

+1
-1
lines changed
  • src/DebugBar/Resources/widgets/templates

1 file changed

+1
-1
lines changed

src/DebugBar/Resources/widgets/templates/widget.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
this.$list = new PhpDebugBar.Widgets.ListWidget({ itemRenderer: function(li, tpl) {
1919
$('<span />').addClass(csscls('name')).text(tpl.name).appendTo(li);
2020

21-
if (typeof tpl.xdebug_link !== 'undefined') {
21+
if (typeof tpl.xdebug_link !== 'undefined' && tpl.xdebug_link !== null) {
2222
if (tpl.xdebug_link.ajax) {
2323
$('<a title="' + tpl.xdebug_link.url + '"></a>').on('click', function () {
2424
$.ajax(tpl.xdebug_link.url);

0 commit comments

Comments
 (0)