-
Notifications
You must be signed in to change notification settings - Fork 2
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: fixed issue where plugin wasn't found #42
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## trunk #42 +/- ##
============================================
- Coverage 67.51% 62.04% -5.48%
============================================
Files 35 27 -8
Lines 1022 685 -337
Branches 125 126 +1
============================================
- Hits 690 425 -265
+ Misses 303 231 -72
Partials 29 29 ☔ View full report in Codecov by Sentry. |
...administration/src/module/sw-in-app-purchases/component/sw-in-app-purchase-checkout/index.ts
Outdated
Show resolved
Hide resolved
92fd4b3
to
4f2a62b
Compare
}; | ||
}, | ||
|
||
created() { | ||
// @deprecated tag:v4.0.0 - Will be removed as this.store.extension will be only a string in shopware 6.7 | ||
const extension = this.store.extension as StoreExtension | string; | ||
this.storeExtension = typeof extension === 'object' && !!extension |
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.
if typeof extension === 'object'
, it will always be trueish
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 causes the unit test to fail, because for some reason it sees null
as an object
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 have a better idea: Shopware.Utils.types.isObject(this.storeExtension)
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.
Really? I HATE JS! Just out of curiosity, does something like this work? this.storeExtension = extension.name || extension
?
56c8435
to
a524a24
Compare
a524a24
to
4c794a2
Compare
Fixed an issue where a plugin wasn't found because it gets filtered out.