Skip to content

Commit

Permalink
fix(flex-offset): correct type when using with 'strictNullChecks' (#929)
Browse files Browse the repository at this point in the history
  • Loading branch information
Teamop authored and CaerusKaru committed Dec 17, 2018
1 parent d322ea7 commit 21b6d29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/apps/demo-app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"strictNullChecks": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
Expand All @@ -18,4 +19,4 @@
"module": "es2015",
"baseUrl": "./"
}
}
}
4 changes: 2 additions & 2 deletions src/lib/flex/flex-offset/flex-offset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ export class FlexOffsetStyleBuilder extends StyleBuilder {
offset = offset + '%';
}
const horizontalLayoutKey = parent.isRtl ? 'margin-right' : 'margin-left';
const styles = isFlowHorizontal(parent.layout) ? {[horizontalLayoutKey]: `${offset}`} :
{'margin-top': `${offset}`};
const styles: StyleDefinition = isFlowHorizontal(parent.layout) ?
{[horizontalLayoutKey]: `${offset}`} : {'margin-top': `${offset}`};

return styles;
}
Expand Down

0 comments on commit 21b6d29

Please sign in to comment.