File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -49,10 +49,10 @@ function createApp (argv = {}) {
4949 rootPath : path . resolve ( argv . root || process . cwd ( ) ) ,
5050 includeHost : argv . multiuser ,
5151 defaultContentType : argv . defaultContentType ,
52- fileSuffixes : {
53- acl : argv . suffixAcl || '.acl' ,
54- meta : argv . suffixMeta || '.meta'
55- }
52+ fileSuffixes : [
53+ argv . suffixAcl || '.acl' ,
54+ argv . suffixMeta || '.meta'
55+ ]
5656 } )
5757
5858 const configPath = config . initConfigDir ( argv )
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ class ResourceMapper {
1616 defaultContentType = 'application/octet-stream' ,
1717 indexFilename = 'index' ,
1818 overrideTypes = { acl : 'text/turtle' , meta : 'text/turtle' } ,
19- fileSuffixes = { acl : '.acl' , meta : '.meta' }
19+ fileSuffixes = [ '.acl' , '.meta' ]
2020 } ) {
2121 this . _rootUrl = this . _removeTrailingSlash ( rootUrl )
2222 this . _rootPath = this . _removeTrailingSlash ( rootPath )
@@ -95,7 +95,7 @@ class ResourceMapper {
9595
9696 // Find a file with the same name (minus the dollar extension)
9797 return ( files . find ( f => this . _removeDollarExtension ( f ) === filename ||
98- ( isIndex && f . startsWith ( this . _indexFilename + '.' ) && ! f . endsWith ( this . _suffixes . acl ) ) ) )
98+ ( isIndex && f . startsWith ( this . _indexFilename + '.' ) && ! this . _suffixes . some ( suffix => f . endsWith ( suffix ) ) ) ) )
9999 }
100100
101101 async getRepresentationUrlForResource ( resourceUrl ) {
You can’t perform that action at this time.
0 commit comments