mirror of
https://github.com/psychopy/psychojs.git
synced 2025-05-10 10:40:54 +00:00
BF: Handle when Sound.setSound
is given a value rather than a Sound object
This commit is contained in:
parent
9265fd8502
commit
b60e6d20ce
@ -156,11 +156,10 @@ export class Sound extends PsychObject
|
||||
{
|
||||
if (!(sound instanceof Sound))
|
||||
{
|
||||
throw {
|
||||
origin: "Sound.setSound",
|
||||
context: "when setting the sound",
|
||||
error: "the argument should be an instance of the Sound class.",
|
||||
};
|
||||
// if given something other than a Sound, do setValue instead
|
||||
this.setValue(sound, log);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
this._setAttribute("value", sound.value, log);
|
||||
|
Loading…
Reference in New Issue
Block a user