Skip to content

Commit 2e210a3

Browse files
committed
fix(tabstractdatabase): fix registerPlugins methods forof loop
1 parent dd7c536 commit 2e210a3

1 file changed

Lines changed: 6 additions & 14 deletions

File tree

sources/core/databases/TAbstractDatabase.js

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -131,27 +131,19 @@ class TAbstractDatabase {
131131

132132
_registerPlugins () {
133133

134-
for ( let [ name, config ] of Object.entries(this._plugins) ) {
134+
for ( let [ name, config ] of Object.entries( this._plugins ) ) {
135135

136-
}
137-
138-
for ( let pluginName in this._plugins ) {
139-
140-
if ( !Object.prototype.hasOwnProperty.call( this._plugins, pluginName ) ) { continue }
141-
142-
const pluginConfig = this._plugins[ pluginName ]
143-
144-
if ( this._registerPackagePlugin( pluginName, pluginConfig ) ) {
136+
if ( this._registerPackagePlugin( name, config ) ) {
145137

146-
console.log( `Use ${pluginName} plugin from node_modules` )
138+
console.log( `Use ${name} plugin from node_modules` )
147139

148-
} else if ( this._registerLocalPlugin( pluginName, pluginConfig ) ) {
140+
} else if ( this._registerLocalPlugin( name, config ) ) {
149141

150-
console.log( `Use ${pluginName} plugin from local folder` )
142+
console.log( `Use ${name} plugin from local folder` )
151143

152144
} else {
153145

154-
console.error( `Unable to register the plugin ${pluginPath} the package or local folder doesn't seem to exist ! Skip it.` )
146+
console.error( `Unable to register the plugin ${name} the package or local folder doesn't seem to exist ! Skip it.` )
155147

156148
}
157149

0 commit comments

Comments
 (0)