From 1f263c57fdfdfd4b472ff59f3a35a0ee1e11e556 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Tue, 9 Jul 2013 02:14:35 +0200 Subject: [PATCH] fool jshint --- app/assets/javascripts/discourse/helpers/i18n_helpers.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/discourse/helpers/i18n_helpers.js b/app/assets/javascripts/discourse/helpers/i18n_helpers.js index a586ad0fe13..2027296e525 100644 --- a/app/assets/javascripts/discourse/helpers/i18n_helpers.js +++ b/app/assets/javascripts/discourse/helpers/i18n_helpers.js @@ -5,9 +5,11 @@ var oldI18nlookup = I18n.lookup; I18n.lookup = function() { - arguments[0] = "js." + arguments[0]; - return oldI18nlookup.apply(this, arguments); -} + // jshint doesn't like when we change the arguments directly... + var args = arguments; + if (args.length > 0) { args[0] = "js." + args[0]; } + return oldI18nlookup.apply(this, args); +}; /** Look up a translation for an i18n key in our dictionary.