From e52f1dc4b2ec8366f83d7560323d5fe104d5accf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hu=C3=A1ng=20J=C3=B9nli=C3=A0ng?= Date: Fri, 14 Jan 2022 18:53:29 -0500 Subject: [PATCH] fix init --- packages/babel-plugin-proposal-decorators/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel-plugin-proposal-decorators/src/index.ts b/packages/babel-plugin-proposal-decorators/src/index.ts index 42e2a097c8..c166dd9e88 100644 --- a/packages/babel-plugin-proposal-decorators/src/index.ts +++ b/packages/babel-plugin-proposal-decorators/src/index.ts @@ -16,6 +16,7 @@ export default declare((api, options) => { if (typeof legacy !== "boolean") { throw new Error("'legacy' must be a boolean."); } + const { decoratorsBeforeExport, version } = options; if (version !== undefined && options.legacy !== undefined) { throw new Error( 'You can either specify `legacy: true` or `version: "legacy"` with decorators, not both.', @@ -23,7 +24,6 @@ export default declare((api, options) => { } legacy ||= version === "legacy"; - const { decoratorsBeforeExport, version } = options; if (decoratorsBeforeExport === undefined) { if (!legacy) { throw new Error(