You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 <[email protected]>
Copy file name to clipboardExpand all lines: core/src/components/accordion-group/accordion-group.tsx
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -87,7 +87,7 @@ export class AccordionGroup implements ComponentInterface {
87
87
* Custom behavior: ['a', 'b']
88
88
*/
89
89
printIonWarning(
90
-
`ion-accordion-group was passed an array of values, but multiple="false". This is incorrect usage and may result in unexpected behaviors. To dismiss this warning, pass a string to the "value" property when multiple="false".
90
+
`[ion-accordion-group] - An array of values was passed, but multiple is "false". This is incorrect usage and may result in unexpected behaviors. To dismiss this warning, pass a string to the "value" property when multiple="false".
91
91
92
92
Value Passed: [${value.map((v)=>`'${v}'`).join(', ')}]
Copy file name to clipboardExpand all lines: core/src/components/app/app.tsx
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ export class App implements ComponentInterface {
46
46
*/
47
47
if(shouldUseCloseWatcher()){
48
48
printIonWarning(
49
-
'experimentalCloseWatcher was set to `true`, but hardwareBackButton was set to `false`. Both config options must be `true` for the Close Watcher API to be used.'
49
+
'[ion-app] - experimentalCloseWatcher was set to `true`, but hardwareBackButton was set to `false`. Both config options must be `true` for the Close Watcher API to be used.'
'[Ionic Warning]: Form with selector: "#missingForm" could not be found. Verify that the id is correct and the form is rendered in the DOM.'
172
+
'[Ionic Warning]: [ion-button] - Form with selector: "#missingForm" could not be found. Verify that the id is correct and the form is rendered in the DOM.'
Copy file name to clipboardExpand all lines: core/src/components/datetime/datetime.tsx
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -584,7 +584,7 @@ export class Datetime implements ComponentInterface {
584
584
* Custom behavior: ['a', 'b']
585
585
*/
586
586
printIonWarning(
587
-
`ion-datetime was passed an array of values, but multiple="false". This is incorrect usage and may result in unexpected behaviors. To dismiss this warning, pass a string to the "value" property when multiple="false".
587
+
`[ion-datetime] - An array of values was passed, but multiple is "false". This is incorrect usage and may result in unexpected behaviors. To dismiss this warning, pass a string to the "value" property when multiple="false".
588
588
589
589
Value Passed: [${value.map((v)=>`'${v}'`).join(', ')}]
590
590
`,
@@ -1389,24 +1389,24 @@ export class Datetime implements ComponentInterface {
1389
1389
1390
1390
if(multiple){
1391
1391
if(presentation!=='date'){
1392
-
printIonWarning('Multiple date selection is only supported for presentation="date".',el);
1392
+
printIonWarning('[ion-datetime] - Multiple date selection is only supported for presentation="date".',el);
1393
1393
}
1394
1394
1395
1395
if(preferWheel){
1396
-
printIonWarning('Multiple date selection is not supported with preferWheel="true".',el);
1396
+
printIonWarning('[ion-datetime] - Multiple date selection is not supported with preferWheel="true".',el);
0 commit comments