mirror of
https://github.com/CompeyDev/lune-packaging.git
synced 2025-01-09 20:29:10 +00:00
Fix crash when saving unsupported attributes
This commit is contained in:
parent
309958deed
commit
0c46a82b10
2 changed files with 4 additions and 3 deletions
|
@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
- Fixed error messages for reading & writing roblox files not containing the full error message
|
- Fixed error messages for reading & writing roblox files not containing the full error message
|
||||||
- Fixed crash when trying to access an instance reference property that points to a destroyed instance
|
- Fixed crash when trying to access an instance reference property that points to a destroyed instance
|
||||||
|
- Fixed crash when trying to save instances that contain unsupported attribute types
|
||||||
|
|
||||||
## `0.6.3` - March 26th, 2023
|
## `0.6.3` - March 26th, 2023
|
||||||
|
|
||||||
|
|
|
@ -24,11 +24,12 @@ pub fn ensure_valid_attribute_name(name: impl AsRef<str>) -> LuaResult<()> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn ensure_valid_attribute_value(value: &DomValue) -> LuaResult<()> {
|
pub fn ensure_valid_attribute_value(value: &DomValue) -> LuaResult<()> {
|
||||||
|
// TODO: Uncomment supported types when they are also supported in rbx-dom serialization
|
||||||
let is_valid = matches!(
|
let is_valid = matches!(
|
||||||
value.ty(),
|
value.ty(),
|
||||||
DomType::Bool
|
DomType::Bool
|
||||||
| DomType::BrickColor
|
| DomType::BrickColor
|
||||||
| DomType::CFrame
|
// | DomType::CFrame
|
||||||
| DomType::Color3
|
| DomType::Color3
|
||||||
| DomType::ColorSequence
|
| DomType::ColorSequence
|
||||||
| DomType::Float32
|
| DomType::Float32
|
||||||
|
@ -42,8 +43,7 @@ pub fn ensure_valid_attribute_value(value: &DomValue) -> LuaResult<()> {
|
||||||
| DomType::UDim
|
| DomType::UDim
|
||||||
| DomType::UDim2
|
| DomType::UDim2
|
||||||
| DomType::Vector2
|
| DomType::Vector2
|
||||||
| DomType::Vector3
|
| DomType::Vector3 // | DomType::Font
|
||||||
| DomType::Font
|
|
||||||
);
|
);
|
||||||
if is_valid {
|
if is_valid {
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
Loading…
Reference in a new issue