-
Notifications
You must be signed in to change notification settings - Fork 680
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
Remove default parameter in updateInstructions()
#1175
Remove default parameter in updateInstructions()
#1175
Conversation
@@ -68,7 +68,8 @@ export class AppComponent implements OnInit { | |||
} | |||
|
|||
// called when tutorial commands need to be displayed | |||
updateInstructions(step = null) { |
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.
since we check the step value anyway, we do not have to set the default value, lets just use updateInstructions(step)
@@ -68,7 +68,8 @@ export class AppComponent implements OnInit { | |||
} | |||
|
|||
// called when tutorial commands need to be displayed | |||
updateInstructions(step = null) { | |||
updateInstructions(step?) { | |||
if (typeof step === 'undefined') { step = null; } |
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.
I think we do not need this, since the switch
statement should cover us
Agreed @chris-rock. PR has been updated 😄 Leaving |
thanks @jerryaldrichiii !!! not sure what's up with the random travis test failing, and appveyor has an odd error too, since the change shouldn't have affected any of that. trying to look into it/see if i have permissions to rerun those |
Thanks @vjeffrey. Looks like a Ruby issue. Specifically:
It looks like Ruby 1.9.3 is on those nodes: |
we discovered it was a problem with term-ansicolor, which requires ruby 2.0+ now, which is a dependency of inquirer. plan is to move that from the test group to a new group called exclude that group when bundle installing in travis resolved with #1178 once this pr is rebased on master we should be g2g @jerryaldrichiii |
Some browsers do not support the use of default parameters. Moving the logic that sets `step` to null if undefined into the function body allows those browsers to render the tutorial correctly.
I rebased my branch to include your fix @vjeffrey. Yay teamwork! ✋ |
Some browsers do not support the use of default parameters.
Moving the logic that sets
step
to null if undefined into the function body allows those browsers to render the tutorial correctly.This fixes #1165