Skip to content

Fix instantiation of extensions

Created by: Gontran-Molotov

The extend(parentNameString, childInstance, override) method allows to extend (override = true) or replace (override = false) internal dash.js objects.

This PR fixes FactoryMaker to not uselessly create an instance of the parent class when the extension fully replaces it (override = false).

It also removes the internal extensions variable and the getExtensionContext() method of FactoryMaker because the context of an extension is always the one passed to getExtensionContext(). Thus, there is no need to look for it, and no need to store extension contexts either.

Merge request reports