-
Notifications
You must be signed in to change notification settings - Fork 633
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
Scorm hashi bugs #7001
Scorm hashi bugs #7001
Conversation
Codecov Report
|
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.
Good catch, tested and the problem appears to be fixed!
const lessonStatus = this.data.cmi.core.lesson_status; | ||
if (statusProgressMap.hasOwnProperty(lessonStatus)) { | ||
const lessonStatus = getByKeyPath(this.data, 'cmi.core.lesson_status', SCHEMA, self.userData); | ||
if (Object.prototype.hasOwnProperty.call(statusProgressMap, lessonStatus)) { |
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.
Just curious about why this change was made. e.g. how Object.prototype.hasOwnProperty.call
differs in behavior from statusProgressMap.hasOwnProperty
. Is this to handle the case where lessonStatus
is undefined? If so, any reason not to check it for undefined first?
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 was flagged by our linter which has this rule: https://eslint.org/docs/rules/no-prototype-builtins
I made the same change the last time I merged pf-mvp
-> develop
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.
Yeah - I originally made this change on develop, so @indirectlylit's linting fix was caught up in my stash. It seemed simpler to retain this change than to undo it when I reapplied it to pf-mvp.
Also, since pf-mvp changes have been merged to develop, we need to make sure we apply this fix there as well. |
Summary
Fixes two small issues that I noticed while using hashi after the SCORM updates:
Reviewer guidance
Contributor Checklist
PR process:
Testing:
Reviewer Checklist
yarn
andpip
)