Skip to content

Commit

Permalink
Fix flow and unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
karimnaaji committed Apr 6, 2022
1 parent dbe0ad4 commit e6fd7f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/style/fog.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class Fog extends Evented {
}

for (const name of Object.keys(styleSpec.fog)) {
if (!fog[name]) {
if (fog && fog[name] === undefined) {
fog[name] = styleSpec.fog[name].default;
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/style/properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,7 @@ export class Properties<Props: Object> {
this.defaultPossiblyEvaluatedValues = ({}: any);
this.overridableProperties = ([]: any);

const defaultParameters = new EvaluationParameters(0, {});
for (const property in properties) {
const prop = properties[property];
if (prop.specification.overridable) {
Expand All @@ -759,7 +760,7 @@ export class Properties<Props: Object> {
this.defaultTransitioningPropertyValues[property] =
defaultTransitionablePropertyValue.untransitioned();
this.defaultPossiblyEvaluatedValues[property] =
defaultPropertyValue.possiblyEvaluate(({}: any));
defaultPropertyValue.possiblyEvaluate(defaultParameters);
}
}
}
Expand Down

0 comments on commit e6fd7f5

Please sign in to comment.