delete and redraft

This commit is contained in:
cutls 2019-12-08 14:50:56 +09:00
parent 046dbc5559
commit 44128d8801

View File

@ -423,7 +423,10 @@ function redraft(id, acct_id) {
var vismode = $('[toot-id=' + id + '] .vis-data').attr('data-vis') var vismode = $('[toot-id=' + id + '] .vis-data').attr('data-vis')
vis(vismode) vis(vismode)
$('#media').val(medias) $('#media').val(medias)
var ct = medias.split(',').length var ct = 0
if(medias && medias != 'null') {
ct = medias.split(',').length
}
$('[toot-id=' + id + '] img.toot-img').each(function(i, elem) { $('[toot-id=' + id + '] img.toot-img').each(function(i, elem) {
if (i < ct) { if (i < ct) {
var url = $(elem).attr('src') var url = $(elem).attr('src')