Files
react-native/Libraries/StyleSheet/__tests__
Kudo Chien 82ceb8c3e3 Only show warning when overwrite existing preprocessor (#34479)
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
2022-08-25 15:03:32 -07:00
..
2017-02-24 08:30:50 -08:00