fixes
This commit is contained in:
@@ -7,7 +7,9 @@ export default abstract class Handler {
|
||||
private _method_handlers: Record<string, Function> = {};
|
||||
|
||||
protected register_handler (f: Function, method?: string): void {
|
||||
if (typeof method === 'undefined') { this._handlers.push (f); }
|
||||
if (typeof method === 'undefined') {
|
||||
this._handlers.push (f);
|
||||
}
|
||||
else {
|
||||
const m = method.toUpperCase ();
|
||||
if (typeof this._method_handlers[m] !== 'undefined')
|
||||
@@ -16,7 +18,10 @@ export default abstract class Handler {
|
||||
}
|
||||
}
|
||||
|
||||
private async run_method_handler (method: string, t: Transaction): Promise<void> {
|
||||
private async run_method_handler (
|
||||
method: string,
|
||||
t: Transaction
|
||||
): Promise<void> {
|
||||
const m = method.toUpperCase ();
|
||||
if (typeof this._method_handlers[m] !== 'undefined')
|
||||
await this._method_handlers[m] (t);
|
||||
|
Reference in New Issue
Block a user