Resolve "Admin Settings: Cannot read property 'addEventListener' of null"

This commit is contained in:
Martin Wortschack 2019-01-21 12:39:11 +00:00 committed by Phil Hughes
parent 466a77517b
commit 51a9c54923
4 changed files with 10 additions and 5 deletions

View File

@ -0,0 +1,3 @@
import initUserInternalRegexPlaceholder from '../../application_settings/account_and_limits';
document.addEventListener('DOMContentLoaded', initUserInternalRegexPlaceholder());

View File

@ -1,7 +1,3 @@
import initAdmin from './admin';
import initUserInternalRegexPlaceholder from './application_settings/account_and_limits';
document.addEventListener('DOMContentLoaded', () => {
initAdmin();
initUserInternalRegexPlaceholder();
});
document.addEventListener('DOMContentLoaded', initAdmin());

View File

@ -0,0 +1,5 @@
---
title: Load initUserInternalRegexPlaceholder only when required
merge_request: 24522
author:
type: fixed

View File

@ -187,6 +187,7 @@ if (process.env.BABEL_ENV === 'coverage') {
'./terminal/terminal_bundle.js',
'./users/users_bundle.js',
'./issue_show/index.js',
'./pages/admin/application_settings/show/index.js',
];
describe('Uncovered files', function() {