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

fix(debugger): console.group not exist on RN #69

Merged
merged 2 commits into from
Mar 12, 2019
Merged

fix(debugger): console.group not exist on RN #69

merged 2 commits into from
Mar 12, 2019

Conversation

ArrayZoneYour
Copy link
Contributor

No description provided.

@leecade
Copy link
Contributor

leecade commented Mar 12, 2019

good job

@ArrayZoneYour
Copy link
Contributor Author

Issue source: rangle/redux-beacon#147

'color: gray; font-weight: lighter;',
'color: black; font-weight: bold;'
)
!isRN &&
Copy link
Contributor

Choose a reason for hiding this comment

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

Discarded if console.group not exist? shall we replace with console.log

@leecade
Copy link
Contributor

leecade commented Mar 12, 2019

HOW ABOUT

if (!console.group) {
  let groups = []
  let hr = '-'.repeat(80)
  console.group = function logGroupStart(label) {
    groups.push(label)
    console.log('%c \nBEGIN GROUP: %c', hr, label)
  }
  console.groupEnd = function logGroupEnd() {
    console.log('END GROUP: %c\n%c', groups.pop(), hr)
  }
}

Copy link
Contributor

@leecade leecade left a comment

Choose a reason for hiding this comment

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

well done

@leecade leecade merged commit 1f2c67d into master Mar 12, 2019
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