mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
initialize store to undefined, not null, and make checks less picky so that reports actually get sent
This commit is contained in:
parent
9c2cd11e43
commit
91dfc1cd76
1 changed files with 5 additions and 5 deletions
|
@ -41,16 +41,16 @@ function (angular, app, kbn, _) {
|
|||
|
||||
// setup the optIn and version values
|
||||
var marvelOpts = storeFactory($scope, 'marvelOpts', {
|
||||
report: null,
|
||||
version: null,
|
||||
lastReport: null
|
||||
report: void 0,
|
||||
version: void 0,
|
||||
lastReport: void 0
|
||||
});
|
||||
|
||||
$scope.init = function () {
|
||||
$scope.kbnVersion = kbnVersion;
|
||||
|
||||
// If the user hasn't opted in or out, ask them to.
|
||||
if(_.isUndefined(marvelOpts.version) || marvelOpts.version !== kbnVersion) {
|
||||
if(marvelOpts.version == null || marvelOpts.version !== kbnVersion) {
|
||||
$scope.optInModal();
|
||||
}
|
||||
|
||||
|
@ -163,7 +163,7 @@ function (angular, app, kbn, _) {
|
|||
// Checks if we should send a report
|
||||
var checkReport = function() {
|
||||
if(marvelOpts.report) {
|
||||
if(_.isUndefined(marvelOpts.lastReport)) {
|
||||
if(marvelOpts.lastReport == null) {
|
||||
return true;
|
||||
} else if (new Date().getTime() - parseInt(marvelOpts.lastReport,10) > reportInterval) {
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue