refactor: Fix typo

Fixes #155
This commit is contained in:
Joachim Van Herwegen 2020-09-16 15:27:12 +02:00
parent fc4df9dbae
commit c150da337e
2 changed files with 2 additions and 2 deletions

View File

@ -118,7 +118,7 @@ export class ExtensionBasedMapper implements FileIdentifierMapper {
*
* @returns A ResourcePath object containing path and (optional) slug fields.
*/
public exctractDocumentName(identifier: ResourceIdentifier): ResourcePath {
public extractDocumentName(identifier: ResourceIdentifier): ResourcePath {
const [ , containerPath, documentName ] = /^(.*\/)([^/]+\/?)?$/u.exec(this.getRelativePath(identifier)) ?? [];
if (
(typeof containerPath !== 'string' || normalizePath(containerPath) === '/') && typeof documentName !== 'string') {

View File

@ -151,7 +151,7 @@ export class FileResourceStore implements ResourceStore {
// Break up the request URI in the different parts `containerPath` and `documentName` as we know their semantics
// from addResource to call the InteractionController in the same way.
const { containerPath, documentName } = this.resourceMapper.exctractDocumentName(identifier);
const { containerPath, documentName } = this.resourceMapper.extractDocumentName(identifier);
// eslint-disable-next-line no-param-reassign
representation.metadata.identifier = DataFactory.namedNode(identifier.path);
const raw = representation.metadata.quads();