robustness review of price calc js
This commit is contained in:
parent
e7c6a53a17
commit
27c41a6187
7 changed files with 143 additions and 24 deletions
|
|
@ -53,12 +53,16 @@ class DOMManager {
|
|||
this.elements.serviceLevelGroup = document.getElementById('serviceLevelGroup');
|
||||
}
|
||||
|
||||
// Get element by key
|
||||
// Get element by key with error handling
|
||||
get(key) {
|
||||
return this.elements[key];
|
||||
const element = this.elements[key];
|
||||
if (!element && key !== 'addonsContainer') {
|
||||
console.warn(`DOM element '${key}' not found`);
|
||||
}
|
||||
return element;
|
||||
}
|
||||
|
||||
// Check if element exists
|
||||
// Check if element exists and is valid
|
||||
has(key) {
|
||||
return this.elements[key] && this.elements[key] !== null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue