mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 22:18:29 +00:00
Returns input value of number or string.
This commit is contained in:
parent
71e1206f89
commit
54ffcc6391
1 changed files with 3 additions and 1 deletions
|
@ -4,7 +4,9 @@
|
|||
|
||||
var GetFastValue = function (source, key, defaultValue)
|
||||
{
|
||||
if (!source || typeof source === 'number')
|
||||
var t = typeof(source);
|
||||
|
||||
if (!source || t === 'number' || t === 'string')
|
||||
{
|
||||
return defaultValue;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue