From c57bc5a9a0653273aa639cda9177ce52efabe42a Mon Sep 17 00:00:00 2001 From: Dylan Schiemann Date: Mon, 4 Jan 2021 12:03:33 -0700 Subject: [PATCH] fix: change default export to named function (#545) 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. --- src/v35.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/v35.js b/src/v35.js index e8706ff0..34d9b1f3 100644 --- a/src/v35.js +++ b/src/v35.js @@ -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);