执行以下代码:
$.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调用无限期挂起。有没有人遇到过类似的问题?
由于
答案 0 :(得分:1)
问题是包含了JSON3 js库,我认为这肯定会破坏用于转换api调用结果的伪造解释器,或者通过覆盖JSON方法。