diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2010-01-12 08:58:49 -0800 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2010-01-12 08:58:49 -0800 |
commit | 42d7c9590ee480e106ac343e6b3224d2b0fdaab0 (patch) | |
tree | 97daf8bc8951a13dd9a9d973db9409a18bb112c8 /modules/gallery/js/l10n_client.js | |
parent | 9ff9d70fe23efdc76bb0a3aaaaa3c8e06166797e (diff) |
Correct the "l10n_client_data[index] is undefined" error.
Diffstat (limited to 'modules/gallery/js/l10n_client.js')
-rw-r--r-- | modules/gallery/js/l10n_client.js | 5 |
1 files changed, 4 insertions, 1 deletions
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 |