From 7390e21934ae18d5b069d3577e50ec0915ff26ac Mon Sep 17 00:00:00 2001 From: Rodrigo Lazoti Date: Tue, 3 Mar 2015 18:07:25 -0300 Subject: [PATCH] fix javascript getter for plug-in system --- src/main/scala/gitbucket/core/plugin/PluginRegistory.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/scala/gitbucket/core/plugin/PluginRegistory.scala b/src/main/scala/gitbucket/core/plugin/PluginRegistory.scala index f1f1a17cc..93b6a266a 100644 --- a/src/main/scala/gitbucket/core/plugin/PluginRegistory.scala +++ b/src/main/scala/gitbucket/core/plugin/PluginRegistory.scala @@ -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 -) \ No newline at end of file +)