Skip to content

Commit

Permalink
Remove replaceAll from RNTester sample code (facebook#48099)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebook#48099

This is currently breaking the Sample Module screen on RN-Tester. Let's remove it.

Changelog:
[Internal] [Changed] - Remove replaceAll from RNTester sample code

Reviewed By: cipolleschi

Differential Revision: D66764656

fbshipit-source-id: acd123374d23b37977d5506f70f29da7f5d6311f
  • Loading branch information
cortinico authored and facebook-github-bot committed Dec 5, 2024
1 parent 2f0977d commit 13900d7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ function stringify(obj: mixed): string {
return value;
}

return (JSON.stringify(obj, replacer) || '').replaceAll('"', "'");
// Change this to don't use replaceAll
return (JSON.stringify(obj, replacer) || '').replace(/"/g, "'");
}

class SampleLegacyModuleExample extends React.Component<{||}, State> {
Expand Down

0 comments on commit 13900d7

Please sign in to comment.