зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1564917 - Use default value when there are no conditions; r=jgraham
Differential Revision: https://phabricator.services.mozilla.com/D37871 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
fb7e73ed08
Коммит
6426ddb4af
|
@ -411,7 +411,9 @@ class PropertyUpdate(object):
|
|||
# If all the values match remove all conditionals
|
||||
# This handles the case where we update a number of existing conditions and they
|
||||
# all end up looking like the post-update default.
|
||||
new_default = conditions[-1][1] if conditions[-1][0] is None else self.default_value
|
||||
new_default = self.default_value
|
||||
if conditions and conditions[-1][0] is None:
|
||||
new_default = conditions[-1][1]
|
||||
if all(condition[1] == new_default for condition in conditions):
|
||||
conditions = [(None, new_default)]
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче