mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-06 05:53:08 -05:00
Merge main into feat/scripts-scriptui-palettes
This commit is contained in:
32 files changed
+5235
-742
No files matched your search
@@ -257,7 +257,7 @@ fn range(i: &mut Interp, message: &str) -> Abrupt {
|
||||
|
||||
/// The value of the own data property `name` of `o`, `undefined` when it has none.
|
||||
fn slot(i: &Interp, o: ObjId, name: &str) -> JsResult<Value> {
|
||||
Ok(match i.get_own_property(o, &key(name))? {
|
||||
Ok(match i.ordinary_own_property(o, &key(name))? {
|
||||
Some(Prop::Data { value, .. }) => value,
|
||||
_ => Value::Undefined,
|
||||
})
|
||||
@@ -363,7 +363,7 @@ fn list_values(i: &Interp, a: ObjId) -> JsResult<Vec<Value>> {
|
||||
};
|
||||
(0..length)
|
||||
.map(|n| {
|
||||
Ok(match i.get_own_property(a, &index_key(n))? {
|
||||
Ok(match i.ordinary_own_property(a, &index_key(n))? {
|
||||
Some(Prop::Data { value, .. }) => value,
|
||||
_ => Value::Undefined,
|
||||
})
|
||||
@@ -2476,7 +2476,7 @@ fn lists_unchanged(i: &Interp, order: &[(ObjId, String, f64)], snapshot: &[Value
|
||||
/// Has each list item in `texts` the text it had when it was read?
|
||||
fn texts_unchanged(i: &Interp, texts: &[(ObjId, Value)]) -> JsResult<bool> {
|
||||
for (item, read) in texts {
|
||||
match i.get_own_property(*item, &key("text"))? {
|
||||
match i.ordinary_own_property(*item, &key("text"))? {
|
||||
Some(Prop::Data { value, .. }) if crate::interp::same_value(&value, read) => {}
|
||||
_ => return Ok(false),
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user