diff --git a/app.py b/app.py index e1a0839..3950ec2 100644 --- a/app.py +++ b/app.py @@ -154,7 +154,7 @@ def ref_parse_book(ref): @app.get("/define") def define(): ref = request.args.get("kw", None) - ref = ref.strip() + if ref: ref = ref.strip() if not ref: return send_file("html/dictionary.html") with open(dictionary_json, 'r') as data: