Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplication on unique id generation #12

Open
fengbinzhu opened this issue Aug 23, 2020 · 0 comments
Open

Duplication on unique id generation #12

fengbinzhu opened this issue Aug 23, 2020 · 0 comments

Comments

@fengbinzhu
Copy link

I found that the tablecell.key for all cells in a table are generated with the same value when I start my node app using express.js or http-server, as shown in the image below.

image

But when I start my app just using node run dev, it works well.

The id generator in this lib is unique.js, the code , i also paste them here,

const now = () => {
  let current = Date.now()
  let last = now.last || current
  now.last = current > last ? current : last + 1
  return now.last
}

const unique = (prefix = '', suffix = '') => {
  return prefix + now().toString(16) + suffix
}

export {
  unique
}

Does anyone know the reason? Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant