Index: trunk/extensions/CodeEditor/modules/jquery.codeEditor.js |
— | — | @@ -226,7 +226,15 @@ |
227 | 227 | */ |
228 | 228 | var saveAndExtend = function( base, extended ) { |
229 | 229 | var saved = {}; |
230 | | - $.map( extended, function( func, name ) { |
| 230 | + // $.map doesn't handle objects in jQuery < 1.6; need this for compat with MW 1.17 |
| 231 | + var map = function( obj, callback ) { |
| 232 | + for (var key in extended ) { |
| 233 | + if ( obj.hasOwnProperty( key ) ) { |
| 234 | + callback( obj[key], key ); |
| 235 | + } |
| 236 | + } |
| 237 | + }; |
| 238 | + map( extended, function( func, name ) { |
231 | 239 | if ( name in base ) { |
232 | 240 | var orig = base[name]; |
233 | 241 | base[name] = function() { |