Skip to content

Commit

Permalink
Merge pull request #323 from AmericanWhitewater/bug/rapid-adding-broken
Browse files Browse the repository at this point in the history
fix usage of nanoid to match documentation
  • Loading branch information
ngottlieb authored Feb 3, 2021
2 parents d4b1cf5 + 76e6145 commit aaca58d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/app/plugins/random-id.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Vue from 'vue'

import { nanoid } from 'nanoid'
import { customAlphabet } from 'nanoid'

/**
* @description use this when creating new resources.
Expand All @@ -9,5 +9,6 @@ import { nanoid } from 'nanoid'
*/

Vue.prototype.$randomId = function () {
return nanoid(21, '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz')
const nanoid = customAlphabet('1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', 21);
return nanoid();
}

0 comments on commit aaca58d

Please sign in to comment.