Skip to content

Commit d7989b1

Browse files
fix missing urlPath option on initial entry handler creation (#2944)
* fix missing urlPath option on initial entry handler creation * add unit test
1 parent 7b9ab31 commit d7989b1

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

components/Scope.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,13 @@ export class Scope extends EventEmitter {
158158
};
159159
}
160160

161-
#getFilesOption(): FilesOption | FileAndURLPathConfig | undefined {
161+
#getFilesOption(): FileAndURLPathConfig | undefined {
162162
const config = this.options.getAll();
163-
if (config && typeof config === 'object' && config !== null && !Array.isArray(config) && 'files' in config) {
164-
// TODO maybe some validation here?
165-
return config.files as FilesOption | FileAndURLPathConfig;
163+
if (config && typeof config === 'object' && config !== null && !Array.isArray(config) && 'files' in config /*&& validate config.files*/) {
164+
return {
165+
files: config.files as FilesOption,
166+
urlPath: config.urlPath as string | undefined,
167+
};
166168
}
167169
return undefined;
168170
}

0 commit comments

Comments
 (0)