summaryrefslogtreecommitdiff
path: root/program/js/editor.js
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2013-10-30 19:51:55 +0100
committerAleksander Machniak <machniak@kolabsys.com>2013-10-30 19:51:55 +0100
commit6a91448aee5d036b35c621bbdaff250dc84e15f3 (patch)
tree4cc4c149e05b163d8a2a209471d07b13344e5801 /program/js/editor.js
parent8d9dcca2b6fc1117e170195aa4104980e5bfa238 (diff)
Improve performance and code readability by using String's startsWith() method, other code improvements
Diffstat (limited to 'program/js/editor.js')
-rw-r--r--program/js/editor.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/program/js/editor.js b/program/js/editor.js
index 6d7b9538a..b349c9c35 100644
--- a/program/js/editor.js
+++ b/program/js/editor.js
@@ -161,7 +161,7 @@ function rcmail_editor_images()
for (i in files) {
att = files[i];
- if (att.complete && att.mimetype.indexOf('image/') == 0) {
+ if (att.complete && att.mimetype.startsWith('image/')) {
list.push([att.name, rcmail.env.comm_path+'&_action=display-attachment&_file='+i+'&_id='+rcmail.env.compose_id]);
}
}