Merge pull request #640 from rlazoti/fix-plugin

fix javascript getter for plug-in system
This commit is contained in:
Naoki Takezoe
2015-03-05 02:00:27 +09:00

View File

@@ -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
)
)