mirror of
https://github.com/liriliri/eruda.git
synced 2026-04-13 10:48:35 +08:00
Fix: Android illegal invocation
This commit is contained in:
@@ -79,12 +79,7 @@ export default function stringify(obj, visited, topObj, simple)
|
||||
}
|
||||
util.each(names, name =>
|
||||
{
|
||||
try {
|
||||
parts.push(`"${escapeJsonStr(name)}": ${stringify(obj[name], visited, null, simple)}`);
|
||||
} catch (e)
|
||||
{
|
||||
parts.push(`"${escapeJsonStr(name)}": "${escapeJsonStr(e.message)}"`);
|
||||
}
|
||||
parts.push(`"${escapeJsonStr(name)}": ${stringify(topObj[name], visited, null, simple)}`);
|
||||
});
|
||||
if (proto) parts.push(proto);
|
||||
json += parts.join(', ') + '}';
|
||||
@@ -134,15 +129,7 @@ export default function stringify(obj, visited, topObj, simple)
|
||||
names.sort(sortObjName);
|
||||
util.each(names, name =>
|
||||
{
|
||||
try
|
||||
{
|
||||
let val = topObj[name];
|
||||
|
||||
parts.push(`"${escapeJsonStr(name)}": ${stringify(val, visited, null, simple)}`);
|
||||
} catch (e)
|
||||
{
|
||||
parts.push(`"${escapeJsonStr(name)}": "${escapeJsonStr(e.message)}"`);
|
||||
}
|
||||
parts.push(`"${escapeJsonStr(name)}": ${stringify(topObj[name], visited, null, simple)}`);
|
||||
});
|
||||
if (proto) parts.push(proto);
|
||||
json += parts.join(',\n') + '\n}';
|
||||
|
||||
@@ -11,7 +11,8 @@ module.exports = {
|
||||
devtool: false,
|
||||
entry: './src/index.es6',
|
||||
devServer: {
|
||||
contentBase: './test'
|
||||
contentBase: './test',
|
||||
port: 3000
|
||||
},
|
||||
output: {
|
||||
path: __dirname + '/dist/',
|
||||
|
||||
Reference in New Issue
Block a user