toshi0383 / TVMLKitchen

Swifty TVML template manager with or without client-server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SearchRecipe.swift @escaping callback block.

opened this issue · comments

Could you please mark override func filterSearchText(_ text: String, callback: ((String) -> Void)) callback block as @escaping.

If a user is fetching search results from a remote API (very likely) the compiler rightly flags that the callback parameter could have escaped by the time remote API has responded.

@FlaviaBondJamesBondsHusband
Thanks for pointing out! filterSearchText was meant to be @escaping, but I forgot to mark it explicitly when I converted to Swift3.
I don't think it affect execution because it is casted to JavaScript anyways.

Do you want to do a PR for me?

@toshi0383 please see PR #125