Comparing version 2.0.7 to 2.0.8
@@ -5,2 +5,7 @@ # Change Log | ||
<a name="2.0.8"></a> | ||
## [2.0.8](https://github.com/zerkalica/lom_atom/compare/v2.0.7...v2.0.8) (2017-11-06) | ||
<a name="2.0.7"></a> | ||
@@ -7,0 +12,0 @@ ## [2.0.7](https://github.com/zerkalica/lom_atom/compare/v2.0.6...v2.0.7) (2017-11-06) |
@@ -369,3 +369,3 @@ function _defineProperties(target, props) { | ||
var scheduleNative = typeof requestAnimationFrame == 'function' ? function (handler) { | ||
var scheduleNative = typeof requestAnimationFrame === 'function' ? function (handler) { | ||
return requestAnimationFrame(handler); | ||
@@ -465,4 +465,2 @@ } : function (handler) { | ||
_proto3.create = function create(atom) { | ||
this._owners.set(atom, atom.owner); | ||
if (this._logger !== undefined) { | ||
@@ -474,5 +472,4 @@ return this._logger.create(atom.owner, atom.field, atom.key, this._namespace); | ||
_proto3._destroyValue = function _destroyValue(atom, from) { | ||
if (typeof from === 'object' && this._owners.get(from) === atom) { | ||
if (this._owners.get(from) === atom) { | ||
try { | ||
from.destructor(); | ||
@@ -479,0 +476,0 @@ } catch (e) { |
@@ -373,3 +373,3 @@ 'use strict'; | ||
var scheduleNative = typeof requestAnimationFrame == 'function' ? function (handler) { | ||
var scheduleNative = typeof requestAnimationFrame === 'function' ? function (handler) { | ||
return requestAnimationFrame(handler); | ||
@@ -469,4 +469,2 @@ } : function (handler) { | ||
_proto3.create = function create(atom) { | ||
this._owners.set(atom, atom.owner); | ||
if (this._logger !== undefined) { | ||
@@ -478,5 +476,4 @@ return this._logger.create(atom.owner, atom.field, atom.key, this._namespace); | ||
_proto3._destroyValue = function _destroyValue(atom, from) { | ||
if (typeof from === 'object' && this._owners.get(from) === atom) { | ||
if (this._owners.get(from) === atom) { | ||
try { | ||
from.destructor(); | ||
@@ -483,0 +480,0 @@ } catch (e) { |
@@ -375,3 +375,3 @@ (function (global, factory) { | ||
var scheduleNative = typeof requestAnimationFrame == 'function' ? function (handler) { | ||
var scheduleNative = typeof requestAnimationFrame === 'function' ? function (handler) { | ||
return requestAnimationFrame(handler); | ||
@@ -471,4 +471,2 @@ } : function (handler) { | ||
_proto3.create = function create(atom) { | ||
this._owners.set(atom, atom.owner); | ||
if (this._logger !== undefined) { | ||
@@ -480,5 +478,4 @@ return this._logger.create(atom.owner, atom.field, atom.key, this._namespace); | ||
_proto3._destroyValue = function _destroyValue(atom, from) { | ||
if (typeof from === 'object' && this._owners.get(from) === atom) { | ||
if (this._owners.get(from) === atom) { | ||
try { | ||
from.destructor(); | ||
@@ -485,0 +482,0 @@ } catch (e) { |
{ | ||
"name": "lom_atom", | ||
"version": "2.0.7", | ||
"version": "2.0.8", | ||
"description": "Alternative implementation of eigenmethod mol_atom state management library", | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
@@ -16,3 +16,3 @@ // @flow | ||
const scheduleNative: (handler: () => void) => number = typeof requestAnimationFrame == 'function' | ||
const scheduleNative: (handler: () => void) => number = typeof requestAnimationFrame === 'function' | ||
? (handler: () => void) => requestAnimationFrame(handler) | ||
@@ -66,3 +66,2 @@ : (handler: () => void) => setTimeout(handler, 16) | ||
create<V>(atom: IAtomInt): V | void { | ||
this._owners.set(atom, atom.owner) | ||
if (this._logger !== undefined) { | ||
@@ -73,9 +72,6 @@ return this._logger.create(atom.owner, atom.field, atom.key, this._namespace) | ||
_destroyValue<V>(atom: IAtom<V>, from?: mixed) { | ||
if ( | ||
typeof from === 'object' | ||
&& this._owners.get(from) === atom | ||
) { | ||
_destroyValue<V>(atom: IAtom<V>, from: any) { | ||
if (this._owners.get(from) === atom) { | ||
try { | ||
;(from: any).destructor() | ||
from.destructor() | ||
} catch(e) { | ||
@@ -82,0 +78,0 @@ console.error(e) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
344542
3606