From 42d7c9590ee480e106ac343e6b3224d2b0fdaab0 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Tue, 12 Jan 2010 08:58:49 -0800 Subject: Correct the "l10n_client_data[index] is undefined" error. --- modules/gallery/js/l10n_client.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'modules/gallery/js') diff --git a/modules/gallery/js/l10n_client.js b/modules/gallery/js/l10n_client.js index 58032a48..f0aff0b6 100644 --- a/modules/gallery/js/l10n_client.js +++ b/modules/gallery/js/l10n_client.js @@ -86,7 +86,10 @@ jQuery.extend(Gallery, { // Get a string from the DOM tree this.getString = function(index, type) { - return l10n_client_data[index][type]; + if (index < l10n_client_data.length) { + return l10n_client_data[index][type]; + } + return ""; }; // Set a string in the DOM tree -- cgit v1.2.3