Files
directus/api/src/utils/get-module-default.ts
Nicola Krumschmidt 6286edf6a9 Remove /custom subpath for endpoints and add a way to customize the endpoint subpath (#7695)
* Remove /custom subpath for endpoints

* Add a way to customize the endpoint subpath
2021-08-30 10:09:12 -04:00

7 lines
139 B
TypeScript

export default function getModuleDefault<T>(mod: T | { default: T }): T {
if ('default' in mod) {
return mod.default;
}
return mod;
}