mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
KnockoutJS primitiveTypes can just be checked with Object()
This commit is contained in:
parent
0e1a34f067
commit
9db2690710
1 changed files with 1 additions and 2 deletions
|
|
@ -10,9 +10,8 @@ ko['extenders'] = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var primitiveTypes = { 'undefined':1, 'boolean':1, 'number':1, 'string':1 };
|
|
||||||
function valuesArePrimitiveAndEqual(a, b) {
|
function valuesArePrimitiveAndEqual(a, b) {
|
||||||
return (a === null || primitiveTypes[typeof(a)]) ? (a === b) : false;
|
return a !== Object(a) && a === b;
|
||||||
}
|
}
|
||||||
|
|
||||||
function throttle(callback, timeout) {
|
function throttle(callback, timeout) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue