Skip to content

Commit d69c5ce

Browse files
committed
Fixing problem with link.
1 parent 76d57c7 commit d69c5ce

File tree

1 file changed

+4
-3
lines changed
  • js/src/main/scala/com/github/aborg0/oeis/ui

1 file changed

+4
-3
lines changed

js/src/main/scala/com/github/aborg0/oeis/ui/Gui.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,17 +132,18 @@ object Gui {
132132
},
133133
{
134134
val values = onChange.map(_.target.asInstanceOf[HTMLSelectElement].value)
135-
Seq(values --> formulaBox.bus.writer, values/*.collect{
135+
Seq(values --> formulaBox.bus.writer, values.collect{
136136
case v if v.startsWith("A") && v.lengthIs == 7 => s"https://oeis.org/$v"
137-
}*/ --> checkOnOeisHref.writer)
137+
case _ => ""
138+
} --> checkOnOeisHref.writer)
138139

139140
},
140141
// Replace with empty selection on change from other sources on formulaBox
141142
inContext(node => value <--
142143
formulaBox.bus.events.collect{ case formula if formula != node.ref.value => node.ref.value }.mapToValue("")
143144
)
144145
),
145-
span(child <-- checkOnOeisHref.signal.map(hrefValue => if (hrefValue.isEmpty || hrefValue.lengthIs != 7) "" else
146+
span(child <-- checkOnOeisHref.signal.map(hrefValue => if (hrefValue.isEmpty) "" else
146147
a(href := hrefValue, target := "_blank", "Check on OEIS"))),
147148
)
148149

0 commit comments

Comments
 (0)