mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 09:15:35 +00:00
Bug 1540149 - Don't use Array.map
in prepareConsoleMessageForRemote
. r=bgrins.
`Array.map` triggers a deprecation warnings, and it turns out we can use `.map` directly on the objects we were calling `Array.map` on. Differential Revision: https://phabricator.services.mozilla.com/D25506 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
f99907635a
commit
c94181f930
@ -1703,17 +1703,20 @@ WebConsoleActor.prototype =
|
||||
delete result.consoleID;
|
||||
|
||||
if (result.stacktrace) {
|
||||
result.stacktrace = Array.map(result.stacktrace, (frame) => {
|
||||
return { ...frame, sourceId: this.getActorIdForInternalSourceId(frame.sourceId) };
|
||||
result.stacktrace = result.stacktrace.map(frame => {
|
||||
return {
|
||||
...frame,
|
||||
sourceId: this.getActorIdForInternalSourceId(frame.sourceId),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
result.arguments = Array.map(message.arguments || [], (obj) => {
|
||||
result.arguments = (message.arguments || []).map(obj => {
|
||||
const dbgObj = this.makeDebuggeeValue(obj, useObjectGlobal);
|
||||
return this.createValueGrip(dbgObj);
|
||||
});
|
||||
|
||||
result.styles = Array.map(message.styles || [], (string) => {
|
||||
result.styles = (message.styles || []).map(string => {
|
||||
return this.createValueGrip(string);
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user