Changeset 108

Show
Ignore:
Timestamp:
02/21/07 18:51:43 (6 years ago)
Author:
robert
Message:

slightly modified getCatalog to prevent errors when no messages are available

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • jala/trunk/code/I18n.js

    r99 r108  
    164164   } 
    165165   var cache = jala.I18n.catalogs; 
    166    var catalog; 
    167    if (!cache[locale]) { 
    168       var messages = this.getMessages(); 
     166   var catalog, messages; 
     167   if (!cache[locale] && (messages = this.getMessages()) != null) { 
    169168      var arr = [locale.getLanguage(), locale.getCountry(), locale.getVariant()]; 
    170169      while (arr.length > 0 && !(catalog = messages[arr.join("_")])) {