1
0
mirror of synced 2025-02-16 20:53:13 +03:00

Update src/Formulate.js

Co-authored-by: Andrew Boyd <andrew@wearebraid.com>
This commit is contained in:
Justin Schroeder 2020-05-02 10:31:51 -04:00 committed by GitHub
parent 84219e10ef
commit 48994e88e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,7 +82,7 @@ class Formulate {
* implementation is open to community review.
*/
nextId (vm) {
const path = vm.$route && vm.$route.path && vm.$route.path || false
const path = vm.$route && vm.$route.path || false
const pathPrefix = path ? vm.$route.path.replace(/[\/\\.\s]/g, '-') : 'global';
if (!Object.prototype.hasOwnProperty.call(this.idRegistry, pathPrefix)) {
this.idRegistry[pathPrefix] = 0;