Skip to content

Commit

Permalink
Merge pull request #7061 from blink1073/fix-pageconfig
Browse files Browse the repository at this point in the history
Fix handling of page config for non-strings
  • Loading branch information
blink1073 committed Aug 21, 2019
2 parents 8f16ca8 + eac4cfb commit e7df370
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/coreutils/src/pageconfig.ts
Expand Up @@ -79,10 +79,10 @@ export namespace PageConfig {
configData = Object.create(null);
} else {
for (let key in configData) {
// Quote characters are escaped, unescape them.
configData[key] = String(configData[key])
.split(''')
.join('"');
// PageConfig expects strings
if (typeof configData[key] !== 'string') {
configData[key] = JSON.stringify(configData[key]);
}
}
}
return configData![name] || Private.getBodyData(name);
Expand Down

0 comments on commit e7df370

Please sign in to comment.