0

执行以下代码:

    $.each(video.videos, function(k, v) {
        forge.prefs.get("video-"+k, function(file) {
            console.log(file, (file));
            if (file) {
                forge.file.URL(file, function (url) {
                    video.videos[k].source = url;
                    console.log("video found: " + k + " " + url);
                });
            } else if (get) {
                forge.file.saveURL(v.url, function(file){
                    console.log("video saved: " + k + " " + v.url);
                    forge.prefs.set("video-"+k, file, function(){
                        download.get_video();
                    });
                });
            }
        });
    });

结果如下:

error occurred: file:///var/mobile/Applications/91521D1A-B4B6-4AAB-9960-F2AD747F1A49/Library/Application%20Support/Forge/assets-6AF5A9D3-5267-4327-889A-8EE004DF7779/forge/all.js:2: TypeError: 'undefined' is not a function (evaluating 'a({message:f.toString()})')

该错误似乎与 forge.prefs.get() 有关,因为 Catalyst 显示 api 调用无限期挂起。有没有人遇到过类似的问题?

谢谢

4

1 回答 1

1

问题在于 JSON3 js 库的包含,我认为这一定破坏了用于翻译 api 调用结果的伪造解释器,可能通过覆盖 JSON 方法。

于 2013-04-25T12:38:26.427 回答