mirror of
https://github.com/certd/certd.git
synced 2026-04-23 19:57:27 +08:00
refactor: fix bug
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { Registry } from '../registry/registry.js'
|
||||
export { AbstractDnsProvider } from './abstract-dns-provider.js'
|
||||
|
||||
export const dnsProviderRegistry = new Registry()
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
export class Registry {
|
||||
constructor () {
|
||||
this.collection = {}
|
||||
@@ -11,7 +10,11 @@ export class Registry {
|
||||
if (this.collection == null) {
|
||||
this.collection = {}
|
||||
}
|
||||
const defineName = (target.define && target.define().name) || target.name
|
||||
let defineName = target.define ? target.define().name : null
|
||||
if (defineName == null) {
|
||||
defineName = target.name
|
||||
}
|
||||
|
||||
this.register(defineName, target)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user