Fix playpen.js
errors on pre
s without IDs
This adds an early return to skip code blocks without IDs. Fixes #20864.
This commit is contained in:
parent
d36dc15952
commit
89ca858bb5
@ -14,6 +14,7 @@
|
||||
(function() {
|
||||
if (window.playgroundUrl) {
|
||||
$('pre.rust').hover(function() {
|
||||
if (!$(this).attr('id')) { return; }
|
||||
var id = '#' + $(this).attr('id').replace('rendered', 'raw');
|
||||
var a = $('<a>').text('⇱').attr('class', 'test-arrow');
|
||||
var code = $(id).text();
|
||||
|
Loading…
x
Reference in New Issue
Block a user