mirror of
https://github.com/tcsenpai/Zundler.git
synced 2025-06-07 20:15:25 +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) {
|
var retrieve_file = function(path) {
|
||||||
// console.log("Retrieving file: " + path);
|
// console.log("Retrieving file: " + path);
|
||||||
var file_tree = window.global_context.file_tree;
|
var file_tree = window.global_context.file_tree;
|
||||||
var file = file_tree[path].data;
|
var file = file_tree[path];
|
||||||
return file;
|
if (!file) {
|
||||||
|
console.log("File not found: " + path);
|
||||||
|
return "";
|
||||||
|
} else {
|
||||||
|
return file.data;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var normalize_path = function(path) {
|
var normalize_path = function(path) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user