Skip to content

Commit

Permalink
fix: ensure correctly generated axe is required by aria-supported b…
Browse files Browse the repository at this point in the history
…uild step (#2295)
  • Loading branch information
jeeyyy authored Jun 17, 2020
1 parent a2873ea commit 1414a9f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build/tasks/aria-supported.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ module.exports = function(grunt) {
* as `axe` does not exist until grunt task `build:uglify` is complete,
* hence cannot be required at the top of the file.
*/
const axe = require('../../axe');
const langOption = grunt.option('lang');
const fileNameSuffix =
langOption && langOption.length > 0 ? `.${langOption}` : '';
const axe = require(`../../axe${fileNameSuffix}`);
const listType = this.data.listType.toLowerCase();
const headings = {
main:
Expand Down

0 comments on commit 1414a9f

Please sign in to comment.