Skip to content

Commit

Permalink
fix: vue 3 log warning causes error on iOS (#6993)
Browse files Browse the repository at this point in the history
Co-authored-by: Mark Anderson <mark@ionic.io>
Co-authored-by: jcesarmobile <jcesarmobile@gmail.com>
  • Loading branch information
3 people committed Mar 22, 2024
1 parent ce9d505 commit 87271e2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
12 changes: 6 additions & 6 deletions android/capacitor/src/main/assets/native-bridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,15 +375,15 @@ var nativeBridge = (function (exports) {
typeof c.dir === 'function');
};
const serializeConsoleMessage = (msg) => {
if (typeof msg === 'object') {
try {
try {
if (typeof msg === 'object') {
msg = JSON.stringify(msg);
}
catch (e) {
// ignore
}
return String(msg);
}
catch (e) {
return '';
}
return String(msg);
};
const platform = getPlatformId(win);
if (platform == 'android' || platform == 'ios') {
Expand Down
11 changes: 5 additions & 6 deletions core/native-bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,15 +403,14 @@ const initBridge = (w: any): void => {
};

const serializeConsoleMessage = (msg: any): string => {
if (typeof msg === 'object') {
try {
try {
if (typeof msg === 'object') {
msg = JSON.stringify(msg);
} catch (e) {
// ignore
}
return String(msg);
} catch (e) {
return '';
}

return String(msg);
};

const platform = getPlatformId(win);
Expand Down
12 changes: 6 additions & 6 deletions ios/Capacitor/Capacitor/assets/native-bridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,15 +375,15 @@ var nativeBridge = (function (exports) {
typeof c.dir === 'function');
};
const serializeConsoleMessage = (msg) => {
if (typeof msg === 'object') {
try {
try {
if (typeof msg === 'object') {
msg = JSON.stringify(msg);
}
catch (e) {
// ignore
}
return String(msg);
}
catch (e) {
return '';
}
return String(msg);
};
const platform = getPlatformId(win);
if (platform == 'android' || platform == 'ios') {
Expand Down

0 comments on commit 87271e2

Please sign in to comment.