Use .includes instead of .startsWith for checking ignored YellowBox warnings
Summary: Some warnings don't have a good prefix that can be targeted using .startsWith, e.g. "Module $modulename requires main queue setup". It would be helpful to be able to select this warning using the much more specific middle part of the string ("requires main queue setup since it overrides `constantsToExport`) so I want to change this check from startsWith to includes to enable that. Changing from .startsWith -> .includes should be completely backward compatible. Reviewed By: TheSavior Differential Revision: D7445309 fbshipit-source-id: 2c91dbe5ee3c3aa74be1bca091b20d294e64e853
This commit is contained in:
parent
3cd2b43426
commit
0b4f33c2d0
|
@ -172,7 +172,7 @@ function ensureSymbolicatedWarning(warning: string): void {
|
|||
|
||||
function isWarningIgnored(warning: string): boolean {
|
||||
const isIgnored = IGNORED_WARNINGS.some((ignoredWarning: string) =>
|
||||
warning.startsWith(ignoredWarning),
|
||||
warning.includes(ignoredWarning),
|
||||
);
|
||||
|
||||
if (isIgnored) {
|
||||
|
|
Loading…
Reference in New Issue