mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
Fix edit control
When a data attribute is missing it should be `false` not `null`.
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
|
||||
function getEmbedUrl(commentUrl, el) {
|
||||
var context = 0;
|
||||
var showedits = el.getAttribute('data-embed-live');
|
||||
|
||||
if (el.getAttribute('data-embed-parent') === 'true') {
|
||||
context++;
|
||||
@@ -34,7 +35,7 @@
|
||||
var query = 'embed=' + el.getAttribute('data-embed-token') +
|
||||
'&context=' + context +
|
||||
'&depth=' + (++context) +
|
||||
'&showedits=' + el.getAttribute('data-embed-live') +
|
||||
'&showedits=' + (showedits === 'true') +
|
||||
'&created=' + el.getAttribute('data-embed-created') +
|
||||
'&showmore=false';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user