Aldo_MX

Really weird IE7/8 bug

Jun 15th, 2011
584
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. temp_transacciones.sort(function ( a, b )
  2. {
  3.     var old_a = a;
  4.     var old_b = b;
  5.     // Aldo: Aun no me explico como es que explorer truena y peor aún este workaround funciona :/
  6.     try
  7.     {
  8.         a = info_permiso[id_div].transaccion[a][ape_transaccion.TRANSACCION].toLowerCase();
  9.         b = info_permiso[id_div].transaccion[b][ape_transaccion.TRANSACCION].toLowerCase();
  10.         if( a < b )
  11.         {
  12.             return -1;
  13.         }
  14.         if( a > b )
  15.         {
  16.             return 1;
  17.         }
  18.         return 0;
  19.     }
  20.     catch(err)
  21.     {
  22.         a = info_permiso[id_div].transaccion[old_a][ape_transaccion.TRANSACCION].toLowerCase();
  23.         b = info_permiso[id_div].transaccion[old_b][ape_transaccion.TRANSACCION].toLowerCase();
  24.         if( a < b )
  25.         {
  26.             return -1;
  27.         }
  28.         if( a > b )
  29.         {
  30.             return 1;
  31.         }
  32.         return 0;
  33.     }
  34. });
Advertisement
Add Comment
Please, Sign In to add comment