mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-10 05:35:05 +08:00
In bug 1115011 I made a change to the console whereby when the user tries to copy content, we check if one of the selected message is a table. Unfortunately, the way I did this was by iterating over the _renderedItems array, using the text selection as start and end indices. The problem is the _renderedItems array only contains the subset of items that are rendered, and the selection may span more than this subset. This is causing "Cannot read property 'consoleMessage' of undefined" exceptions and preventing users from copying altogether. In this change, I made use of the _providerElement function instead. Bug: 1115011 Change-Id: I10f9d55a6d6cdb4a15d7810f9a48ec694256068c Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2393463 Commit-Queue: Patrick Brosset <patrick.brosset@microsoft.com> Reviewed-by: Mathias Bynens <mathias@chromium.org>