Skip to content

Maybe fix assets 2 #2856

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 45 commits into from
Dec 25, 2023
Merged

Maybe fix assets 2 #2856

merged 45 commits into from
Dec 25, 2023

Conversation

mendyEdri
Copy link
Contributor

@mendyEdri mendyEdri commented Dec 17, 2023

Description

Fix isSVG logic on web to ignore base64 assets

Changelog

Fix isSVG logic on web to ignore base64 assets

Additional info

N/A

Comment on lines 12 to 20
let isSvg = false;
if (typeof source === 'function') {
isSvg = true;
} else if (isSvgUri(source)) {
isSvg = true;
} else if (Constants.isWeb && isSvgData(source)) {
isSvg = true;
}
return isSvg;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not keep like this?

return (typeof source === 'function') || isSvgUri(source) || (Constants.isWeb && isSvgData(source));

@@ -1,14 +1,23 @@
import get from 'lodash/get';
import {ImageProps} from 'react-native';
import Assets from '../assets';
import {Constants} from 'src/commons/new';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix import path to
import {Constants} from '../commons/new';

@mendyEdri mendyEdri requested a review from ethanshar December 25, 2023 13:00
@ethanshar ethanshar merged commit 74be3c1 into master Dec 25, 2023
@mendyEdri mendyEdri deleted the maybe-fix-assets-2 branch December 26, 2023 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants