Skip to content

Commit 336dc46

Browse files
committed
fix: check typeof decoratorsBeforeExport
1 parent 24d3e4a commit 336dc46

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "babel-preset-proposal-typescript",
3-
"version": "1.4.3",
3+
"version": "1.4.4",
44
"description": "Yet another Babel preset for TypeScript, only transforms proposals which TypeScript does not support now.",
55
"repository": "[email protected]/rx-ts/babel-preset-proposal-typescript.git",
66
"author": "JounQin <[email protected]>",

src/index.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,14 @@ export default declare((api, opts) => {
3232
plugins: [
3333
[
3434
syntaxDecorators,
35-
{
36-
decoratorsBeforeExport,
37-
legacy: decoratorsLegacy,
38-
},
35+
Object.assign(
36+
{
37+
legacy: decoratorsLegacy,
38+
},
39+
typeof decoratorsBeforeExport === 'boolean' && {
40+
decoratorsBeforeExport,
41+
},
42+
),
3943
],
4044
syntaxDynamicImport,
4145
[

0 commit comments

Comments
 (0)