Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: vue 3 log warning causes error on iOS #6993

Merged
merged 10 commits into from
Mar 22, 2024
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