From 454a52d9a23d3cd86980d80bed6c8d70acc8c4dc Mon Sep 17 00:00:00 2001 From: bringert Date: Wed, 3 Jan 2007 18:17:52 +0000 Subject: [PATCH] VoiceXML: when checking the callbacks, use typeof to avoid errors with Opera 9.10. --- src/GF/Speech/GrammarToVoiceXML.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GF/Speech/GrammarToVoiceXML.hs b/src/GF/Speech/GrammarToVoiceXML.hs index 5fbef29b6..7b27e9f34 100644 --- a/src/GF/Speech/GrammarToVoiceXML.hs +++ b/src/GF/Speech/GrammarToVoiceXML.hs @@ -171,7 +171,7 @@ fun2sub gr cat fun args = doCallback :: String -> VIdent -> [XML] -> [XML] -> XML doCallback f cat i e = - if_else ("callbacks && " ++ cf ++ " && !" ++ cf ++ "("++string (prIdent cat)++","++ catFieldId cat ++ ")") + if_else ("typeof callbacks != 'undefined' && typeof " ++ cf ++ " != 'undefined' && !" ++ cf ++ "("++string (prIdent cat)++","++ catFieldId cat ++ ")") i e where cf = "callbacks." ++ f