зеркало из https://github.com/microsoft/reactxp.git
Fixed bug #815: Show warning in console if disallowed style combinations appear
This commit is contained in:
Родитель
3d24cba1b1
Коммит
18e7897add
|
@ -195,6 +195,15 @@ export class Styles extends RX.Styles {
|
|||
}
|
||||
|
||||
if (def.flex !== undefined) {
|
||||
// In development mode, see if we're going to overwrite explicit flexGrow
|
||||
// or flexShrink attributes. It's a programming error to specify these in
|
||||
// combination with flex.
|
||||
if (AppConfig.isDevelopmentMode()) {
|
||||
if (adaptedRuleSet.flexGrow !== undefined || adaptedRuleSet.flexShrink !== undefined) {
|
||||
console.error('Conflicting rules for flex specified.');
|
||||
}
|
||||
}
|
||||
|
||||
let flexValue = def.flex;
|
||||
delete adaptedRuleSet.flex;
|
||||
if (flexValue > 0) {
|
||||
|
|
|
@ -265,6 +265,15 @@ export class Styles extends RX.Styles {
|
|||
}
|
||||
|
||||
if (def.flex !== undefined) {
|
||||
// In development mode, see if we're going to overwrite explicit flexGrow
|
||||
// or flexShrink attributes. It's a programming error to specify these in
|
||||
// combination with flex.
|
||||
if (AppConfig.isDevelopmentMode()) {
|
||||
if (def.flexGrow !== undefined || def.flexShrink !== undefined) {
|
||||
console.error('Conflicting rules for flex specified.');
|
||||
}
|
||||
}
|
||||
|
||||
let flexValue = def.flex as number;
|
||||
delete def.flex;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче