Skip to content

Instantly share code, notes, and snippets.

@mrvdb
Created February 5, 2015 09:44
Show Gist options
  • Save mrvdb/6ba921210d3b702383de to your computer and use it in GitHub Desktop.
Save mrvdb/6ba921210d3b702383de to your computer and use it in GitHub Desktop.
Don use a firefox only construct for default parameter value
diff --git a/js/util.js b/js/util.js
index d7b1033..20911d8 100644
--- a/js/util.js
+++ b/js/util.js
@@ -1384,7 +1384,8 @@ var SN = { // StatusNet
*
* @param {String} tag
*/
- switchInputFormTab: function (tag, setFocus=true) {
+ switchInputFormTab: function (tag, setFocus) {
+ if (typeof setFocus === 'undefined') { setFocus = True; }
// The one that's current isn't current anymore
$('.input_form_nav_tab.current').removeClass('current');
if (tag != null) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment