From 16e8a35d42dea2616616ae27e5823d427b4ca5d7 Mon Sep 17 00:00:00 2001 From: Riley Dulin Date: Fri, 6 Dec 2019 13:33:38 -0800 Subject: [PATCH] Remove groupCollapsed from list of unsupported polyfills Summary: Changelog: [Internal] Remove groupCollapsed from list of unsupported polyfills `console.groupCollapsed` was always replaced with `originalConsole`'s implementation, but the right behavior is to have it be a proxy (call both `console` and `originalConsole`). So remove this key from a list of unsupported functions. Reviewed By: yungsters Differential Revision: D18820158 fbshipit-source-id: d83cffbc7e7939c2654fad2e0d681da7c3b5196a --- Libraries/polyfills/console.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Libraries/polyfills/console.js b/Libraries/polyfills/console.js index 90b3531771..585a1a3c87 100644 --- a/Libraries/polyfills/console.js +++ b/Libraries/polyfills/console.js @@ -599,14 +599,7 @@ if (global.nativeLoggingHook) { // The following methods are not supported by this polyfill but // we still should pass them to original console if they are // supported by it. - [ - 'clear', - 'dir', - 'dirxml', - 'groupCollapsed', - 'profile', - 'profileEnd', - ].forEach(methodName => { + ['clear', 'dir', 'dirxml', 'profile', 'profileEnd'].forEach(methodName => { if (typeof originalConsole[methodName] === 'function') { console[methodName] = function() { originalConsole[methodName](...arguments);