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 label to mobxpromise instance for debugging purposes #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

alisman
Copy link

@alisman alisman commented Oct 24, 2022

No description provided.

@@ -43,6 +43,8 @@ export type MobxPromiseInputParams<R> = {
* It will not be called for out-of-date promises.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@onursumer this is the only file that need be reviewed. the rest are generated by build.

Comment on lines 156 to 158
if (localStorage.debugMP) {
debugger;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this debugger on purpose? Do we need this because source code is not mapped?

// we need to
if (this.isComplete === false) {
/*@ts-ignore*/
if (this.onPrematureRead) this.onPrematureRead.call(this);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@onursumer this is a little nicer. i need to be able to execute some stuff when this happens so i can now configure that in code by tacking on a method to prototype

Copy link
Member

@onursumer onursumer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants