-
Notifications
You must be signed in to change notification settings - Fork 667
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
fix: function names #580
fix: function names #580
Conversation
} | ||
} | ||
|
||
function addSlotToVm (vm: Component, slotName: string, slotValue: Component | string | Array<Component> | Array<string>): void { |
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.
Could you move the slotValue into its own type:
type SlotValue = Component | string | Array<Component> | Array<string>
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.
Thank you for pointng out.
I added a type.
I think a person who do not understand specifications and codes can not add large cosmetic change appropriately. |
I've skipped the failing tests—#581 |
if (typeof slotValue === 'string') { | ||
slotValue = slotValue.trim() |
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.
When slotValue
is ' foo '
, this line make a bug.
This process introduced at #556 .
I added a test for spaces.
I think this make it easy to read and
git blame
.