generated from Seekra/repository-template
fix(settings): omit leading/trailing and consecuting dots in noralizePagePath
This commit is contained in:
@@ -17,7 +17,10 @@ limitations under the License.
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
const normalizePagePath = function normalizePagePath (path) {
|
||||
return path.replaceAll('.', '/');
|
||||
return path
|
||||
.replace(/\.+/g, '.')
|
||||
.replace(/^\.+|\.+$/g, '')
|
||||
.replaceAll('.', '/');
|
||||
};
|
||||
|
||||
export const useSettingsPage = function useSettingsPage () {
|
||||
|
||||
Reference in New Issue
Block a user