Skip to content

Commit

Permalink
Avoid error on missing getLogger (v8)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Sep 16, 2024
1 parent 1cc0753 commit aa84971
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ function makeLoader(callback) {

async function loader(source, inputSourceMap, overrides) {
const filename = this.resourcePath;
const logger = this.getLogger("babel-loader");
const logger = typeof this.getLogger === "function" ? this.getLogger("babel-loader") : {

Check failure on line 57 in src/index.js

View workflow job for this annotation

GitHub Actions / lint

Replace `·typeof·this.getLogger·===·"function"·?·this.getLogger("babel-loader")` with `⏎····typeof·this.getLogger·===·"function"⏎······?·this.getLogger("babel-loader")⏎·····`

Check failure on line 57 in src/index.js

View workflow job for this annotation

GitHub Actions / lint

Replace `·typeof·this.getLogger·===·"function"·?·this.getLogger("babel-loader")` with `⏎····typeof·this.getLogger·===·"function"⏎······?·this.getLogger("babel-loader")⏎·····`
debug: () => {},

Check failure on line 58 in src/index.js

View workflow job for this annotation

GitHub Actions / lint

Insert `······`

Check failure on line 58 in src/index.js

View workflow job for this annotation

GitHub Actions / lint

Insert `······`
};

Check failure on line 59 in src/index.js

View workflow job for this annotation

GitHub Actions / lint

Insert `······`

Check failure on line 59 in src/index.js

View workflow job for this annotation

GitHub Actions / lint

Insert `······`

let loaderOptions = loaderUtils.getOptions(this);

Expand Down

0 comments on commit aa84971

Please sign in to comment.