Commit 3a844b79 authored by Filipa Lacerda's avatar Filipa Lacerda

Fix queried element

parent 46d8209e
......@@ -72,10 +72,10 @@ class ImporterStatus {
// eslint-disable-next-line consistent-return
export default function initImporterStatus() {
const importerStatus = $('.js-importer-status');
const data = importerStatus.dataset;
const importerStatus = document.querySelector('.js-importer-status');
if (importerStatus.length) {
if (importerStatus) {
const data = importerStatus.dataset;
return new ImporterStatus(data.jobsImportPath, data.importPath);
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment