mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
82ceb8c3e3
Summary: from the original design of `StyleSheet.setStyleAttributePreprocessor()` in https://github.com/facebook/react-native/issues/11138, the overwriting warning shows when the existing preprocess is be overwritten. the behavior changes from https://github.com/facebook/react-native/commit/33b385825c72. This PR revises the logic back to original design. ## Changelog [Internal] [Fixed] - Show warning only when overwriting existing preprocessor in `StyleSheet.setStyleAttributePreprocessor()` Pull Request resolved: https://github.com/facebook/react-native/pull/34479 Test Plan: Unit Test ``` PASS Libraries/StyleSheet/__tests__/StyleSheet-test.js setStyleAttributePreprocessor ✓ should not show warning when set preprocessor first time (2 ms) ✓ should show warning when overwrite the preprocessor (1 ms) ``` Reviewed By: dmitryrykun Differential Revision: D38940676 Pulled By: cipolleschi fbshipit-source-id: 80cf30fff62f4a02c17f7f42b3260a6011d5fc82