Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Lowercase plugin names before generating slugs
  • Loading branch information
swissspidy committed Jul 7, 2023
commit 5438e4e247b254f8644b076379a4014188e633b7
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ async function getPluginsMap( this: RequestUtils, forceRefetch = false ) {
for ( const plugin of plugins ) {
// Ideally, we should be using sanitize_title() in PHP rather than kebabCase(),
// but we don't have the exact port of it in JS.
this.pluginsMap[ kebabCase( plugin.name ) ] = plugin.plugin;
// This is a good approximation though.
const slug = kebabCase( plugin.name.toLowerCase() );
this.pluginsMap[ slug ] = plugin.plugin;
}
return this.pluginsMap;
}
Expand Down