summaryrefslogtreecommitdiffstats
path: root/core/js/placeholder.js
diff options
context:
space:
mode:
authorkondou <kondou@ts.unde.re>2013-09-25 17:19:38 +0200
committerkondou <kondou@ts.unde.re>2013-09-25 17:19:38 +0200
commit5e7a7b3f6187365c60e63dfed8699e525be45a0b (patch)
tree31ff81bb727f754fc6a528c3db96186669750fc8 /core/js/placeholder.js
parent24eb41548eb6fc08849619b9725cbb61679f04f6 (diff)
downloadnextcloud-server-5e7a7b3f6187365c60e63dfed8699e525be45a0b.tar.gz
nextcloud-server-5e7a7b3f6187365c60e63dfed8699e525be45a0b.zip
Shorten optional text-argument processing
Diffstat (limited to 'core/js/placeholder.js')
-rw-r--r--core/js/placeholder.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/js/placeholder.js b/core/js/placeholder.js
index 3c7b11ef468..ee2a8ce84c4 100644
--- a/core/js/placeholder.js
+++ b/core/js/placeholder.js
@@ -48,9 +48,8 @@
(function ($) {
$.fn.placeholder = function(seed, text) {
- if (typeof(text) === "undefined") {
- text = seed;
- }
+ // set optional argument "text" to value of "seed" if undefined
+ text = text || seed;
var hash = md5(seed),
maxRange = parseInt('ffffffffffffffffffffffffffffffff', 16),