fix: getListenServerHooks

This commit is contained in:
Chareice 2022-02-09 09:56:52 +08:00 committed by chenos
parent 672c44e376
commit fca6977ad1

View File

@ -3,7 +3,7 @@ import { HookType } from './server-hooks';
class UiSchemaModel extends MagicAttributeModel {
getListenServerHooks(type: HookType) {
const hooks = this.get('x-server-hooks');
const hooks = this.get('x-server-hooks') || {};
return hooks[type] || [];
}
}