fix(settings): omit leading/trailing and consecuting dots in noralizePagePath
This commit is contained in:
2 files changed
+30
-4
No files matched your search
@@ -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