-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Remove Object.assign from TS files #4389
Changes from all commits
d7e0d08
7585dbb
73aef50
b9e2f69
532cb43
3a16936
5ed52c0
a2a42cf
7a336a6
9e94771
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,8 +44,10 @@ class MDCGridListFoundation extends MDCFoundation<MDCGridListAdapter> { | |
private readonly resizeHandler_: EventListener; | ||
private resizeFrame_ = 0; | ||
|
||
constructor(adapter: MDCGridListAdapter) { | ||
super(Object.assign(MDCGridListFoundation.defaultAdapter, adapter)); | ||
/* istanbul ignore next: optional argument is not a branch statement */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm honestly not sure why it's needed in some places but not others. I've noticed that it's usually needed when a base foundation is subclassed by another foundation that doesn't have its own constructor (e.g., tab-scroller), but this case I have no idea. My only guess is that it's a quirk in Istanbul. |
||
constructor(adapter?: Partial<MDCGridListAdapter>) { | ||
super({...MDCGridListFoundation.defaultAdapter, ...adapter}); | ||
|
||
this.resizeHandler_ = this.alignCenter.bind(this); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this comment skipping? There's no default assignment and I don't see any conditionals in the output code... shouldn't this end up hit during our unit tests anyway?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome to Istanbul 😛 If you remove this comment, code coverage drops on certain components. Don't ask me to explain it, cuz I gave up trying to figure it out after 30 min of banging my head against a wall.