mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-08-28 22:30:40 -04:00
Return a default falsey value for unknown params based on param type
This commit is contained in:
parent
8203eb2c91
commit
2d2b691b6f
2 changed files with 17 additions and 4 deletions
|
@ -110,7 +110,9 @@ test('PushGetParam', t => {
|
|||
th.pushParam('testParam', 'testValue');
|
||||
t.strictEquals(th.peekStackFrame().params.testParam, 'testValue');
|
||||
t.strictEquals(th.getParam('testParam'), 'testValue');
|
||||
|
||||
// Params outside of define stack always evaluate to null
|
||||
t.strictEquals(th.getParam('nonExistentParam'), null);
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue