From be5f4f6e8beae9138c510d7b5ef821a92e33410f Mon Sep 17 00:00:00 2001 From: joyqi Date: Fri, 6 Dec 2013 20:51:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=9B=BF=E6=8D=A2=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/media.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/admin/media.php b/admin/media.php index 7c9f1570..399127df 100644 --- a/admin/media.php +++ b/admin/media.php @@ -83,8 +83,11 @@ $(document).ready(function() { } function fileUploadComplete (id, url, data) { - var img = $('.typecho-attachment-photo').get(0); - img.src = 'attachment->url(); ?>?' + Math.random(); + var img = $('.typecho-attachment-photo'); + + if (img.length > 0) { + img.get(0).src = 'attachment->url(); ?>?' + Math.random(); + } $('#' + id).html(''.replace('%s', data.title)) .effect('highlight', 1000, function () {