0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-25 04:22:46 +01:00

update `.raw-content` when edit issue/comment content (#16021)

* update ``.raw-content`` when edit issue/comment content

fix #16000

Signed-off-by: a1012112796 <1012112796@qq.com>

* handle empty content

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
a1012112796 2021-06-01 10:22:49 +08:00 committed by GitHub
parent 5de01e21a1
commit 072df3ff87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1098,8 +1098,10 @@ async function initRepository() {
}, (data) => {
if (data.length === 0 || data.content.length === 0) {
$renderContent.html($('#no-content').html());
$rawContent.text('');
} else {
$renderContent.html(data.content);
$rawContent.text($textarea.val());
}
const $content = $segment;
if (!$content.find('.dropzone-attachments').length) {