mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-30 02:19:52 +02:00
Use incrementing number to generate keys
This commit is contained in:
@@ -18,8 +18,7 @@
|
||||
"keycode": "^2.1.2",
|
||||
"lodash": "^4.13.1",
|
||||
"type-of": "^2.0.1",
|
||||
"ua-parser-js": "^0.7.10",
|
||||
"uid": "0.0.2"
|
||||
"ua-parser-js": "^0.7.10"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^0.14.0 || ^15.0.0",
|
||||
|
@@ -1,6 +1,4 @@
|
||||
|
||||
import generate from 'uid'
|
||||
|
||||
let N = 0
|
||||
|
||||
/**
|
||||
@@ -10,7 +8,7 @@ let N = 0
|
||||
*/
|
||||
|
||||
function uid() {
|
||||
return (N++) + generate(4)
|
||||
return String(N++)
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user