Skip to content

Commit

Permalink
Optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
superdav42 committed Sep 18, 2024
1 parent 07be069 commit 08ddae4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions Block/Catalog/Product/Usage.php
Original file line number Diff line number Diff line change
Expand Up @@ -575,9 +575,8 @@ public function getPreviousCategories(): array
} catch (Exception $e) {
// Probably usage was deleted, skip.
continue;
$tried++;
}

$tried++;
if (count($previousCategories) >= 10 || $tried > 20) {
break 2;
}
Expand Down
2 changes: 1 addition & 1 deletion view/base/web/usage.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
define([
'jquery',
'priceBox',
'jquery/ui',
'jquery-ui-modules/widget',
'domReady!',
], function ($, priceBox) {
'use strict';
Expand Down

0 comments on commit 08ddae4

Please sign in to comment.