-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
chore: update docs app to Angular v15 #7238
base: master
Are you sure you want to change the base?
chore: update docs app to Angular v15 #7238
Conversation
this.location.subscribe((state) => { | ||
return this.urlSubject.next(state.url || ''); | ||
}); |
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.
this.location.subscribe((state) => { | |
return this.urlSubject.next(state.url || ''); | |
}); | |
this.location.subscribe((state) => return this.urlSubject.next(state.url ?? '')); |
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.
@LcsGa Did you mean this?
this.location.subscribe((state) => { | |
return this.urlSubject.next(state.url || ''); | |
}); | |
this.location.subscribe((state) => this.urlSubject.next(state.url || '')); |
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.
Oh indeed! Forget to remove the return
keyboard plus I would have used the nullish coalescing operator ??
instead of ||
const search = Object.keys(params).reduce((acc, key) => { | ||
const value = params[key]; | ||
return (value === undefined) ? acc : | ||
acc += (acc ? '&' : '?') + `${encodeURIComponent(key)}=${encodeURIComponent(value)}`; | ||
return value === undefined ? acc : (acc += (acc ? '&' : '?') + `${encodeURIComponent(key)}=${encodeURIComponent(value)}`); |
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.
return value === undefined ? acc : (acc += (acc ? '&' : '?') + `${encodeURIComponent(key)}=${encodeURIComponent(value)}`); | |
return value === undefined ? acc : (acc + (acc ? '&' : '?') + `${encodeURIComponent(key)}=${encodeURIComponent(value)}`); |
=
is not needed since you already return the result which will be the new acc
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.
Which needs to become new acc
, therefore it is needed 🙂
Anyways, I didn't change anything in this PR, a lot of fixes here are just Prettier uglifying things (I don't like Prettier), therefore, if it worked before, I wouldn't change it now.
Description:
Update docs app to Angular v15
Related issue (if exists):
None