Skip to content
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

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

Bird87ZA
Copy link
Contributor

Fixed an issue where a plugin wasn't found because it gets filtered out.

@Bird87ZA Bird87ZA requested review from mstegmeyer and cyl3x January 16, 2025 10:14
@Bird87ZA Bird87ZA self-assigned this Jan 16, 2025
cyl3x
cyl3x previously approved these changes Jan 16, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.04%. Comparing base (d9080ec) to head (4c794a2).

❗ There is a different number of reports uploaded between BASE (d9080ec) and HEAD (4c794a2). Click for more details.

HEAD has 46 uploads less than BASE
Flag BASE (d9080ec) HEAD (4c794a2)
47 1
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.
📢 Have feedback on the report? Share it here.

@Bird87ZA Bird87ZA force-pushed the next-40268/add-string-support-to-request branch from 92fd4b3 to 4f2a62b Compare January 16, 2025 12:33
@Bird87ZA Bird87ZA requested a review from cyl3x January 16, 2025 12:33
};
},

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
Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Contributor

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)

Copy link
Contributor

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?

@Bird87ZA Bird87ZA force-pushed the next-40268/add-string-support-to-request branch 3 times, most recently from 56c8435 to a524a24 Compare January 16, 2025 13:15
cyl3x
cyl3x previously approved these changes Jan 17, 2025
@Bird87ZA Bird87ZA force-pushed the next-40268/add-string-support-to-request branch from a524a24 to 4c794a2 Compare January 17, 2025 07:57
@Bird87ZA Bird87ZA merged commit bd0ade9 into trunk Jan 17, 2025
3 checks passed
@Bird87ZA Bird87ZA deleted the next-40268/add-string-support-to-request branch January 17, 2025 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants