Commit d5bc0240 authored by Jan Scheffler's avatar Jan Scheffler Committed by Commit Bot

[devtools] Fixed sorting Cache Storage items by name

Fixed regression introduced in #152d4e13
(https://chromium-review.googlesource.com/c/chromium/src/+/1566120/5/third_party/blink/renderer/devtools/front_end/resources/ServiceWorkerCacheViews.js)
by updating the comparator to use _name instead of _path too

Bug: chromium:1000278
Change-Id: I258a3122f880be061b312a3336a47cefa28721eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1782563Reviewed-by: default avatarErik Luo <luoe@chromium.org>
Reviewed-by: default avatarYang Guo <yangguo@chromium.org>
Commit-Queue: Jan Scheffler <janscheffler@google.com>
Cr-Commit-Position: refs/heads/master@{#693793}
parent 1a1e2c70
...@@ -159,7 +159,7 @@ Resources.ServiceWorkerCacheView = class extends UI.SimpleView { ...@@ -159,7 +159,7 @@ Resources.ServiceWorkerCacheView = class extends UI.SimpleView {
const columnId = this._dataGrid.sortColumnId(); const columnId = this._dataGrid.sortColumnId();
let comparator; let comparator;
if (columnId === 'name') if (columnId === 'name')
comparator = (a, b) => a._path.localeCompare(b._path); comparator = (a, b) => a._name.localeCompare(b._name);
else if (columnId === 'contentType') else if (columnId === 'contentType')
comparator = (a, b) => a.data.mimeType.localeCompare(b.data.mimeType); comparator = (a, b) => a.data.mimeType.localeCompare(b.data.mimeType);
else if (columnId === 'contentLength') else if (columnId === 'contentLength')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment