Fix playpen.js errors on pres without IDs

This adds an early return to skip code blocks without IDs.

Fixes #20864.
This commit is contained in:
Pascal Hertleif 2015-01-10 11:55:48 +01:00
parent d36dc15952
commit 89ca858bb5

View File

@ -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();