Skip to content

Commit b6cd383

Browse files
other symbols are undefined
1 parent 57d64f2 commit b6cd383

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/PyBytesProxyHandler.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,10 +375,11 @@ bool PyBytesProxyHandler::getOwnPropertyDescriptor(
375375
{JS::PropertyAttribute::Enumerable}
376376
)
377377
));
378-
return true;
378+
} else {
379+
desc.set(mozilla::Nothing());
379380
}
380381

381-
return true; // needed for console.log
382+
return true;
382383
}
383384

384385
// item

tests/python/test_buffer_typed_array.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def test_bytes_console():
271271
temp_out = StringIO()
272272
sys.stdout = temp_out
273273
pm.eval('console.log')(bytes("hello world", "ascii"))
274-
assert temp_out.getvalue().__contains__("104,101,108,108,111,32,119,111,114,108,100")
274+
assert temp_out.getvalue() == "\x1b[32m[String: '104,101,108,108,111,32,119,111,114,108,100']\x1b[39m\n"
275275

276276

277277
# iterator symbol property

0 commit comments

Comments
 (0)