Explorar o código

Sort origins by descending order

simov %!s(int64=7) %!d(string=hai) anos
pai
achega
90fbc3f75d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      content/options.js

+ 1 - 1
content/options.js

@@ -261,7 +261,7 @@ m.mount(document.querySelector('main'), {
         // allowed origins
         // allowed origins
         (state.file || Object.keys(state.origins).length > 1 || null) &&
         (state.file || Object.keys(state.origins).length > 1 || null) &&
         m('ul.m-list',
         m('ul.m-list',
-          Object.keys(state.origins).sort().map((origin) =>
+          Object.keys(state.origins).sort((a, b) => a < b ? 1 : a > b ? -1 : 0).map((origin) =>
             (
             (
               (
               (
                 state.file && origin === 'file://' &&
                 state.file && origin === 'file://' &&