Upgrading Add-on unconditionally updates JavaScript Timestamp

Affected version


Well-known member
When upgrading an Add-on, jsLastUpdate which is used to calculated the JavaScript cache buster is unconditionally updated after importing Add-on Data in XF\AddOn\AddOn:postDataImport().

public function postDataImport()
    // all data will be imported, re-enable this so postX methods will have access to their methods
    $installed = $this->installedAddOn;
    if (!$installed)
        throw new \LogicException("Add-on is not installed");

    $installed->is_processing = false;

    \XF::repository('XF:Option')->updateOption('jsLastUpdate', \XF::$time);

This seems kinda inefficient as many Add-Ons (including official XFI) don't have any JS, it therefore would be better to only update the timestamp if an Add-on actually has JavaScript files.