From bffa93726f37c0601829dc00c569631a40e6c077 Mon Sep 17 00:00:00 2001 From: Dominique Quatravaux Date: Thu, 7 Nov 2019 17:29:15 +0100 Subject: [PATCH] Stop relying on underscore.js' _ being magically available Fixes #246 --- package.json | 3 ++- src/ObservableCursor.ts | 2 +- src/utils.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 53e1fe03..6ad115e2 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,8 @@ "homepage": "http://www.angular-meteor.com", "peerDependencies": { "@types/meteor": "^1.4.6", - "rxjs": "^5.4.3 || ^6.0.0" + "rxjs": "^5.4.3 || ^6.0.0", + "underscore": "1.9.1" }, "devDependencies": { "@types/chai": "4.0.4", diff --git a/src/ObservableCursor.ts b/src/ObservableCursor.ts index e47518bd..865be545 100644 --- a/src/ObservableCursor.ts +++ b/src/ObservableCursor.ts @@ -2,7 +2,7 @@ import { Observable , Subscriber , Subject } from 'rxjs'; import { gZone, forkZone, removeObserver } from './utils'; -declare let _; +import * as _ from 'underscore'; export class ObservableCursor extends Observable { private _zone: Zone; diff --git a/src/utils.ts b/src/utils.ts index 0595284f..d006f2cd 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,6 +1,6 @@ import { Subscriber } from 'rxjs'; -declare let _; +import * as _ from 'underscore'; export declare type CallbacksObject = { onReady?: Function;