Unexpected empty function 'nuOnPromptClose'.
5497 }
5498}
5499
5500function nuOnPromptClose (val, ok) {5501}5502
5503function nuPrompt (text, caption, defaultValue, format, fctn) {
5504 if ($('#nupromptmodal').length == 0) {
Unexpected empty function.
4944 }
4945
4946 if ((nuIsMacintosh() ? e.metaKey : e.ctrlKey) == false) {
4947 nuSelectBrowse = function (e, t) { } // -- so that it doesn't run twice.4948 }
4949 }
4950}
Unexpected empty function.
4929 const ro = window.nuFORM.getProperty('redirect_other_form_id')
4930
4931 if (formType == 'browse' && ro == '' && parent.$('#nuDragDialog').length == 0) {
4932 nuSelectBrowse = function (e, t) { }4933 return
4934 }
4935
Description
Having empty functions hurts readability, and is considered a code-smell. There's almost always a way to avoid using them. If you must use one, consider adding a comment to inform the reader of its purpose.
Bad Practice
getUser('SwaGaLisTiQuE', () => {})
function f() {}
Recommended
getUser('SwaGaLisTiQuE', () => {
// empty because <reason>
})
function f() {
// intentionally empty. <reason>
}