mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-09 08:25:03 +02:00
Fix Uncaught TypeError: Cannot read properties of null (reading 'app_obj') when clicking a project title.
onclick for nextmatch rows was not getting re-parsed for each row, so it was trying with the original widget from the template instead of the one from the row. Also accepting widget as argument into compiled legacy code and using it over original context so we don't need to re-compile for each row.
This commit is contained in:
@ -111,7 +111,8 @@ export function et2_compileLegacyJS(_code, _widget, _context)
|
||||
|
||||
// Execute the code and return its results, pass the egw instance and
|
||||
// the widget
|
||||
return function(ev) {
|
||||
return function(ev, widget?)
|
||||
{
|
||||
// Dump the executed code for debugging
|
||||
egw.debug('log', 'Executing legacy JS code: ', _code);
|
||||
|
||||
@ -120,7 +121,7 @@ export function et2_compileLegacyJS(_code, _widget, _context)
|
||||
egw.debug('warn', 'Legacy JS code only supports 2 arguments (event and widget)', _code, arguments);
|
||||
}
|
||||
// Return the result of the called function
|
||||
return func.call(context, ev, _widget);
|
||||
return func.call(context, ev, widget || _widget);
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user