From 5e7a7b3f6187365c60e63dfed8699e525be45a0b Mon Sep 17 00:00:00 2001 From: kondou Date: Wed, 25 Sep 2013 17:19:38 +0200 Subject: [PATCH] Shorten optional text-argument processing --- core/js/placeholder.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/js/placeholder.js b/core/js/placeholder.js index 3c7b11ef46..ee2a8ce84c 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),