chore(): add todo

This commit is contained in:
Liam DeBeasi 2022-11-18 14:02:03 +00:00
parent 9978c27800
commit d8b5f8a7a3
1 changed files with 3 additions and 2 deletions

View File

@ -81,18 +81,19 @@ export const initialize = (userConfig: IonicConfig = {}) => {
const isAllowedIonicModeValue = (elmMode: string) => ['ios', 'md'].includes(elmMode);
setMode((elm: any) => {
const check = elm.hasAttribute('liam');
while (elm) {
const elmMode = (elm as any).mode || elm.getAttribute('mode');
if (elmMode) {
if (isAllowedIonicModeValue(elmMode)) {
return elmMode;
return check === true ? 'none' : elmMode;
} else if (isIonicElement(elm)) {
console.warn('Invalid ionic mode: "' + elmMode + '", expected: "ios" or "md"');
}
}
elm = elm.parentElement;
}
return defaultMode;
return check === true ? 'none' : defaultMode;
});
};