mirror of
https://github.com/gitbucket/gitbucket.git
synced 2026-01-06 23:52:18 +01:00
Merge pull request #640 from rlazoti/fix-plugin
fix javascript getter for plug-in system
This commit is contained in:
@@ -54,8 +54,8 @@ class PluginRegistry {
|
||||
|
||||
//def getJavaScripts(): List[(String, String)] = javaScripts.toList
|
||||
|
||||
def getJavaScript(currentPath: String): Option[String] = {
|
||||
javaScripts.find(x => currentPath.matches(x._1)).map(_._2)
|
||||
def getJavaScript(currentPath: String): List[String] = {
|
||||
javaScripts.filter(x => currentPath.matches(x._1)).toList.map(_._2)
|
||||
}
|
||||
|
||||
private case class GlobalAction(
|
||||
@@ -158,4 +158,4 @@ case class PluginInfo(
|
||||
version: String,
|
||||
description: String,
|
||||
pluginClass: Plugin
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user