Skip to content

Commit d089ef6

Browse files
committed
Some fixes.
1 parent 86ec838 commit d089ef6

File tree

4 files changed

+7
-13
lines changed

4 files changed

+7
-13
lines changed

src/datastore/index.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
var observe = require('../../lib/observe-js/observe-js');
2-
31
function lifecycleNoop(resourceName, attrs, cb) {
42
cb(null, attrs);
53
}
@@ -799,7 +797,7 @@ function DSProvider() {
799797
if (typeof Object.observe !== 'function' ||
800798
typeof Array.observe !== 'function') {
801799
$rootScope.$watch(function () {
802-
observe.Platform.performMicrotaskCheckpoint();
800+
DSUtils.observe.Platform.performMicrotaskCheckpoint();
803801
});
804802
}
805803

src/datastore/sync_methods/digest.js

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
var observe = require('../../../lib/observe-js/observe-js');
2-
31
/**
42
* @doc method
53
* @id DS.sync methods:digest
@@ -22,12 +20,13 @@ var observe = require('../../../lib/observe-js/observe-js');
2220
*
2321
*/
2422
function digest() {
25-
if (!this.$rootScope.$$phase) {
26-
this.$rootScope.$apply(function () {
27-
observe.Platform.performMicrotaskCheckpoint();
23+
var _this = this;
24+
if (!_this.$rootScope.$$phase) {
25+
_this.$rootScope.$apply(function () {
26+
_this.utils.observe.Platform.performMicrotaskCheckpoint();
2827
});
2928
} else {
30-
observe.Platform.performMicrotaskCheckpoint();
29+
_this.utils.observe.Platform.performMicrotaskCheckpoint();
3130
}
3231
}
3332

src/datastore/sync_methods/inject.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
var observe = require('../../../lib/observe-js/observe-js');
21
var _compute = require('./compute')._compute;
32

43
function errorPrefix(resourceName) {
@@ -156,7 +155,7 @@ function _inject(definition, resource, attrs, options) {
156155
resource.collection.push(item);
157156

158157
resource.changeHistories[id] = [];
159-
resource.observers[id] = new observe.ObjectObserver(item);
158+
resource.observers[id] = new DSUtils.observe.ObjectObserver(item);
160159
resource.observers[id].open(_react, item);
161160
resource.index.put(id, item);
162161

src/utils.js

-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ var toPromisify = [
5656
'afterDestroy'
5757
];
5858

59-
var isRegExp = require('mout/lang/isRegExp');
6059
var deepEquals = angular.equals;
6160

6261
var observe = require('../lib/observe-js/observe-js');
@@ -73,7 +72,6 @@ module.exports = ['$q', function ($q) {
7372
isNumber: angular.isNumber,
7473
isFunction: angular.isFunction,
7574
isEmpty: require('mout/lang/isEmpty'),
76-
isRegExp: isRegExp,
7775
toJson: JSON.stringify,
7876
fromJson: angular.fromJson,
7977
makePath: require('mout/string/makePath'),

0 commit comments

Comments
 (0)