Fix: Android illegal invocation

This commit is contained in:
surunzi
2016-06-28 13:54:01 +08:00
parent ca36419ec4
commit 4124c269ea
2 changed files with 4 additions and 16 deletions

View File

@@ -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}';

View File

@@ -11,7 +11,8 @@ module.exports = {
devtool: false,
entry: './src/index.es6',
devServer: {
contentBase: './test'
contentBase: './test',
port: 3000
},
output: {
path: __dirname + '/dist/',