Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// and if the theme used to create them corresponds to the theme
// registered with ThemedStyleSheet
if (styleDef && currentTheme === registeredTheme) {
return styleDef;
}
if (
process.env.NODE_ENV !== 'production'
&& typeof performance !== 'undefined'
&& performance.mark !== undefined && typeof performance.clearMarks === 'function'
) {
performance.clearMarks(START_MARK);
performance.mark(START_MARK);
}
const isRTL = direction === DIRECTIONS.RTL;
if (isRTL) {
styleDefRTL = styleFn
? ThemedStyleSheet.createRTL(styleFn)
: EMPTY_STYLES_FN;
currentThemeRTL = registeredTheme;
styleDef = styleDefRTL;
} else {
styleDefLTR = styleFn
? ThemedStyleSheet.createLTR(styleFn)
: EMPTY_STYLES_FN;
currentThemeLTR = registeredTheme;
styleDef = styleDefLTR;
}