From 97017f92c25c5faa4511ca08ffe8ad66561d2a22 Mon Sep 17 00:00:00 2001 From: Rich-Harris Date: Sun, 1 Apr 2018 11:28:39 -0400 Subject: [PATCH] ugh node 6 --- src/generators/Generator.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/generators/Generator.ts b/src/generators/Generator.ts index 28a581d6ce..5d8e472c5b 100644 --- a/src/generators/Generator.ts +++ b/src/generators/Generator.ts @@ -359,8 +359,8 @@ export default class Generator { }) }; - const stringMethods = Object.getOwnPropertyDescriptors(String.prototype); - Object.entries(stringMethods).forEach(([name, descriptor]) => { + Object.getOwnPropertyNames(String.prototype).forEach(name => { + const descriptor = Object.getOwnPropertyDescriptor(String.prototype, name); if (typeof descriptor.value === 'function') { Object.defineProperty(css, name, { value: (...args) => {