mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
Do something wrong instead of crashing for partitions pointing at files
This commit is contained in:
parent
9aa27f4c11
commit
9733f059c2
1 changed files with 1 additions and 2 deletions
|
|
@ -32,8 +32,7 @@ fn file_to_instances(
|
|||
|
||||
// This is placeholder logic; this whole function is!
|
||||
let (class_name, property_key, name) = {
|
||||
// TODO: Root instances have an empty route
|
||||
let file_name = route.route.last().unwrap();
|
||||
let file_name = route.route.last().unwrap_or(&route.partition);
|
||||
|
||||
fn strip_suffix<'a>(source: &'a str, suffix: &'static str) -> &'a str {
|
||||
&source[..source.len() - suffix.len()]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue