Fix check for valid Sone IDs.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / SearchPage.java
index 4348434..6c9e15c 100644 (file)
@@ -310,7 +310,7 @@ public class SearchPage extends SoneTemplatePage {
         */
        private String getSoneId(String phrase) {
                String soneId = phrase.startsWith("sone://") ? phrase.substring(7) : phrase;
-               return (webInterface.getCore().getSone(soneId) != null) ? soneId : null;
+               return (webInterface.getCore().getSone(soneId).isPresent()) ? soneId : null;
        }
 
        /**