kopia lustrzana https://github.com/c9/core
Merge pull request +10964 from c9/reduce-uid-checks
[not trivial] Reduces the uid checks - less warningspull/227/head
commit
8c80d7b596
|
@ -6,16 +6,18 @@ if (define === undefined) {
|
|||
|
||||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
|
||||
var hasInternalDomain = require("c9/has-internal-domain");
|
||||
var hasInternalTestName = require("c9/has-internal-test-name");
|
||||
|
||||
function skipAnalytics(user) {
|
||||
function skipAnalytics(user) {
|
||||
if (!user) return true;
|
||||
if (user.id === -1 || user.uid === -1) return true;
|
||||
if (user.id === -1) return true;
|
||||
|
||||
if (!user.id && user.uid === -1) return true;
|
||||
|
||||
if (hasInternalTestName(user)) return true;
|
||||
if (hasInternalDomain(user.email)) return true;
|
||||
if (hasInternalDomain(user.email)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue