pull/7738/head
Rich-Harris 8 years ago
parent e8442d01eb
commit 97017f92c2

@ -359,8 +359,8 @@ export default class Generator {
}) })
}; };
const stringMethods = Object.getOwnPropertyDescriptors(String.prototype); Object.getOwnPropertyNames(String.prototype).forEach(name => {
Object.entries(stringMethods).forEach(([name, descriptor]) => { const descriptor = Object.getOwnPropertyDescriptor(String.prototype, name);
if (typeof descriptor.value === 'function') { if (typeof descriptor.value === 'function') {
Object.defineProperty(css, name, { Object.defineProperty(css, name, {
value: (...args) => { value: (...args) => {

Loading…
Cancel
Save