@@ -329,12 +329,8 @@ elementToBeamer slideLevel (Sec lvl _num (ident,classes,kvs) tit elts)
329329 hasCodeBlock _ = []
330330 let hasCode (Code _ _) = [True]
331331 hasCode _ = []
332− opts <- gets stOptions
333332 let fragile = "fragile" `elem` classes ||
334− not (null $ query hasCodeBlock elts ++
335− if writerListings opts
336− then query hasCode elts
337− else [])
333+ not (null $ query hasCodeBlock elts ++ query hasCode elts)
338334 let frameoptions = ["allowdisplaybreaks", "allowframebreaks",
339335 "b", "c", "t", "environment",
340336 "label", "plain", "shrink"]