mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
Fix node6 support for Object.entries and URL object (#548)
This patch introduces a polyfill for Object.entries which is missing in Node 6
This commit is contained in:
committed by
Andrey Lushnikov
parent
4e3b6a1f57
commit
2c4dfbfd88
@@ -218,4 +218,9 @@ class Helper {
|
||||
}
|
||||
}
|
||||
|
||||
// Polyfill from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries
|
||||
if (!Object.entries)
|
||||
Object.entries = obj => Object.keys(obj).map(key => [key, obj[key]]);
|
||||
|
||||
|
||||
module.exports = Helper;
|
||||
|
||||
Reference in New Issue
Block a user