mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-08 23:58:13 +08:00
fix(config): allow LogLevel to work with isolatedModules and update all warns and errors to respect logLevel (#30350)
Issue number: internal --------- ## What is the current behavior? - `LogLevel` throws error `Error: Cannot access ambient const enums when 'isolatedModules' is enabled` - Several existing console warns and errors are not calling the function that respects the `logLevel` config ## What is the new behavior? - Remove `const` from the `enum` to work with `isolatedModules` - Update `console.warn`s to `printIonWarning` - Update `console.error`s to `printIonError` ## Does this introduce a breaking change? - [ ] Yes - [x] No ## Other information Dev build: `8.5.5-dev.11744729748.174bf7e0` --------- Co-authored-by: Brandy Smith <6577830+brandyscarney@users.noreply.github.com>
This commit is contained in:
@ -8,6 +8,7 @@ import {
|
||||
printIonContentErrorMsg,
|
||||
} from '@utils/content';
|
||||
import { clamp, componentOnReady, getElementRoot, raf, transitionEndAsync } from '@utils/helpers';
|
||||
import { printIonError } from '@utils/logging';
|
||||
import { ImpactStyle, hapticImpact } from '@utils/native/haptic';
|
||||
|
||||
import { getIonMode } from '../../global/ionic-global';
|
||||
@ -452,7 +453,7 @@ export class Refresher implements ComponentInterface {
|
||||
|
||||
async connectedCallback() {
|
||||
if (this.el.getAttribute('slot') !== 'fixed') {
|
||||
console.error('Make sure you use: <ion-refresher slot="fixed">');
|
||||
printIonError('[ion-refresher] - Make sure you use: <ion-refresher slot="fixed">');
|
||||
return;
|
||||
}
|
||||
const contentEl = this.el.closest(ION_CONTENT_ELEMENT_SELECTOR);
|
||||
|
||||
Reference in New Issue
Block a user