Skip to content

Commit

Permalink
fix: change default export to named function (#545)
Browse files Browse the repository at this point in the history
Frameworks like Next.js complain about anonymous export default functions, e.g.

`Anonymous function declarations cause Fast Refresh to not preserve local component state.`

Versions except for v3/5 already use named exports, so update v3/5 to do the same.
  • Loading branch information
dylans committed Jan 4, 2021
1 parent ed32401 commit c57bc5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/v35.js
Expand Up @@ -16,7 +16,7 @@ function stringToBytes(str) {
export const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
export const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';

export default function (name, version, hashfunc) {
export default function v35(name, version, hashfunc) {
function generateUUID(value, namespace, buf, offset) {
if (typeof value === 'string') {
value = stringToBytes(value);
Expand Down

0 comments on commit c57bc5a

Please sign in to comment.