mirror of
https://github.com/morluto/rea
synced 2026-10-26 06:16:17 -04:00
fix(javascript): preserve exact static property keys (#3480)
* fix(javascript): preserve Electron options with static empty keys * fix(javascript): retain exact computed member keys
This commit is contained in:
@@ -693,11 +693,8 @@ export const calleeName = (node: t.Node): string => {
|
||||
const memberPropertyName = (
|
||||
node: t.MemberExpression | t.OptionalMemberExpression,
|
||||
): string =>
|
||||
node.computed &&
|
||||
!t.isStringLiteral(node.property) &&
|
||||
!t.isNumericLiteral(node.property)
|
||||
? `[computed@${String(node.property.start ?? -1)}]`
|
||||
: semanticStaticPropertyName(node.property, node.computed);
|
||||
semanticStaticPropertyKey(node.property, node.computed) ??
|
||||
(node.computed ? `[computed@${String(node.property.start ?? -1)}]` : "");
|
||||
|
||||
/**
|
||||
* Return a string literal value without evaluating an expression. A template
|
||||
|
||||
Reference in New Issue
Block a user