Merge pull request #65 from saul-jb/fix/wrong-path

fix: Correct the wrong path join method being used in ensure-ac-address.js.
This commit is contained in:
Hayden Young
2023-04-06 18:41:33 +08:00
committed by GitHub

View File

@@ -1,9 +1,9 @@
import path from 'path'
import pathJoin from './path-join.js'
// Make sure the given address has '/_access' as the last part
export default address => {
const suffix = address.toString().split('/').pop()
return suffix === '_access'
? address
: path.join(address, '/_access')
: pathJoin(address, '/_access')
}