From 05ef02bd2907f4e3ce1b72d6d84d1a2b3acc94c1 Mon Sep 17 00:00:00 2001 From: timb Date: Mon, 12 Apr 2010 08:55:59 -0700 Subject: fix ajax upload script error --- static/js/pichat.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'static/js') diff --git a/static/js/pichat.js b/static/js/pichat.js index 9ffcae1..e753195 100644 --- a/static/js/pichat.js +++ b/static/js/pichat.js @@ -445,7 +445,8 @@ function activateProfileEditable() { return escapeHtml(newVal); }; - setupUploadAvatar('upload'); + if ($('#avatar.editable').length > 0) + setupUploadAvatar('upload'); var textareaOpts = { 'default_text': 'Enter here!', 'callback': onSubmit, -- cgit v1.2.3-70-g09d2