Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/metro-symbolicate/src/symbolicate.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,10 @@ function readAll(stream: Readable | ReadStream) {

stream.setEncoding('utf8');
stream.on('readable', () => {
let chunk;
// flowlint-next-line sketchy-null-string:off
while ((chunk = stream.read())) {
let chunk = stream.read();
while (chunk != null && chunk !== '') {
data += chunk.toString();
chunk = stream.read();
}
});
stream.on('end', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ export default function constantFoldingPlugin(context: {
state.stripped = true;

if (result.value || node.alternate) {
const valueIsTruthy = Boolean(result.value);
// $FlowFixMe[incompatible-type]
// $FlowFixMe[sketchy-null-mixed] Flow error uncovered by typing Babel more strictly
path.replaceWith(result.value ? node.consequent : node.alternate);
path.replaceWith(valueIsTruthy ? node.consequent : node.alternate);
} else if (!result.value) {
path.remove();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,10 @@ async function _getRamOptions(
);

return {
// $FlowFixMe[sketchy-null-bool]
preloadedModules: preloadedModules || {},
preloadedModules:
preloadedModules != null && preloadedModules !== false
? preloadedModules
: {},
ramGroups: ramGroups || [],
};
}
Loading