Skip to content

Commit

Permalink
Optional catch binding
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenjoezhang committed Apr 8, 2024
1 parent c00506e commit c05a6f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions scripts/events/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@ const path = require('path');
let css;
try {
css = require('@adobe/css-tools');
// eslint-disable-next-line no-unused-vars
} catch (error) {
} catch {
css = require('css');
}

function resolve(name, file = '') {
let dir;
try {
dir = path.dirname(require.resolve(`${name}/package.json`));
// eslint-disable-next-line no-unused-vars
} catch (error) {
} catch {
return '';
}
return `${dir}/${file}`;
Expand Down
3 changes: 1 addition & 2 deletions scripts/events/lib/vendors.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ const { getVendors } = require('./utils');
let internal;
try {
internal = require('@next-theme/plugins');
// eslint-disable-next-line no-unused-vars
} catch (error) {
} catch {
}
const vendorsFile = fs.readFileSync(path.join(__dirname, '../../../_vendors.yml'));
const dependencies = yaml.load(vendorsFile);
Expand Down

0 comments on commit c05a6f9

Please sign in to comment.