Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add firstRunPromise #12824

Merged
merged 21 commits into from Dec 5, 2023
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
4654adb
Allow for await-able autoruns by adding firstRunPromise to computatio…
DanielDornhardt Oct 4, 2023
1a7ad0d
Merge branch 'devel' into tracker-computation-firstRunPromise
StorytellerCZ Oct 11, 2023
3a8e09a
Apply @radekmie suggestions
harryadel Oct 12, 2023
262a6dc
Merge branch 'devel' of github.com:harryadel/meteor into HEAD
harryadel Oct 12, 2023
6106a2c
Merge branch 'devel' into tracker-firstRunPromise
Grubba27 Nov 6, 2023
ff615a5
[tracker] add then and catch
harryadel Nov 19, 2023
2eb32ba
Merge branch 'tracker-firstRunPromise' of github.com:harryadel/meteor…
harryadel Nov 19, 2023
4fc44cb
Merge branch 'devel' into tracker-firstRunPromise
StorytellerCZ Nov 21, 2023
f2c98ae
[tracker] await then & catch
harryadel Nov 22, 2023
8223aef
Merge branch 'tracker-firstRunPromise' of github.com:harryadel/meteor…
harryadel Nov 22, 2023
e41c8ec
Update packages/tracker/tracker.js
harryadel Nov 28, 2023
2e32f1c
[tracker] Add a test without firstRunPromise
harryadel Nov 29, 2023
a30c131
[tracker] attach methods without the use of 'this'
harryadel Nov 29, 2023
e91c5c2
Merge branch 'devel' into tracker-firstRunPromise
harryadel Nov 29, 2023
8888925
Fixed missing firstRunPromise.
radekmie Nov 29, 2023
cc07fe5
[tracker] Remove joke because Gabriel is no fun :sob:
harryadel Dec 4, 2023
8e90991
[tracker] Use of firstRunPromise is not necessary paragraph
harryadel Dec 4, 2023
01acda0
Merge branch 'release-2.14' into tracker-firstRunPromise
StorytellerCZ Dec 4, 2023
654f366
Merge branch 'release-2.14' into tracker-firstRunPromise
StorytellerCZ Dec 4, 2023
0afa7df
Solve error in jsdoc generation
Grubba27 Dec 4, 2023
c47c3a1
Adjusting typo
Grubba27 Dec 4, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/tracker/tracker.js
Expand Up @@ -212,13 +212,13 @@ Tracker.Computation = class Computation {
* @param {*} onRejected
* @returns
*/
this.then = function (onResolved, onRejected) {
return this.firstRunPromise.then(onResolved, onRejected);
this.then = async function (onResolved, onRejected) {
await this.firstRunPromise.then(onResolved, onRejected);
radekmie marked this conversation as resolved.
Show resolved Hide resolved
};


this.catch = function (onRejected) {
return this.firstRunPromise.catch(onRejected)
this.catch = async function (onRejected) {
await this.firstRunPromise.catch(onRejected)
};

var errored = true;
Expand Down Expand Up @@ -604,7 +604,7 @@ Tracker.autorun = function (f, options = {}) {
Tracker.onInvalidate(function () {
c.stop();
});
// console.log("C - Computation: ", c)
return c;
};

Expand Down