mirror of
https://github.com/tcsenpai/Zundler.git
synced 2025-06-06 11:35:40 +00:00
Handle non-existing files gracefully
This commit is contained in:
parent
1924eb07a9
commit
369a9fd3cb
@ -142,8 +142,13 @@ var is_virtual = function(url) {
|
||||
var retrieve_file = function(path) {
|
||||
// console.log("Retrieving file: " + path);
|
||||
var file_tree = window.global_context.file_tree;
|
||||
var file = file_tree[path].data;
|
||||
return file;
|
||||
var file = file_tree[path];
|
||||
if (!file) {
|
||||
console.log("File not found: " + path);
|
||||
return "";
|
||||
} else {
|
||||
return file.data;
|
||||
}
|
||||
};
|
||||
|
||||
var normalize_path = function(path) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user