Skip to content

Commit d5648df

Browse files
authored
Merge pull request #248 from PaulBGD/parse-numbers-correctly-ssr
Fix partial numbers being detected as numbers but in SSR code
2 parents 01cc356 + d767e6a commit d5648df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/generators/server-side-rendering/visitors/Component.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default {
2121
} else if ( attribute.value.length === 1 ) {
2222
const chunk = attribute.value[0];
2323
if ( chunk.type === 'Text' ) {
24-
value = isNaN( parseFloat( chunk.data ) ) ? JSON.stringify( chunk.data ) : chunk.data;
24+
value = isNaN( chunk.data ) ? JSON.stringify( chunk.data ) : chunk.data;
2525
} else {
2626
const { snippet } = generator.contextualise( chunk.expression );
2727
value = snippet;

0 commit comments

Comments
 (0)