Skip to content

Conversation

@pyu10055
Copy link
Collaborator

@pyu10055 pyu10055 commented Apr 13, 2020

fixes tensorflow/tfjs-wechat#62
To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.


This change is Reviewable

@pyu10055 pyu10055 requested a review from lina128 April 13, 2020 18:00
Copy link
Collaborator

@lina128 lina128 left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 approvals obtained (waiting on @lina128 and @pyu10055)


tfjs-core/src/device_util.ts, line 23 at r1 (raw file):

// tslint:disable-next-line:no-any
export function _isMobile(navigator: any): boolean {
  if (typeof navigator === 'undefined' && navigator == null) {

nit: Why not put this check in isMobile()? Then only call _isMobile when navigator is available.

Copy link
Collaborator Author

@pyu10055 pyu10055 left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 approvals obtained (waiting on @lina128)


tfjs-core/src/device_util.ts, line 23 at r1 (raw file):

Previously, lina128 (Na Li) wrote…

nit: Why not put this check in isMobile()? Then only call _isMobile when navigator is available.

main reason for testing, now I have added helper method, which I can mock.

Copy link
Collaborator

@lina128 lina128 left a comment

Choose a reason for hiding this comment

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

LGTM

Reviewable status: :shipit: complete! 1 of 1 approvals obtained (waiting on @lina128)

@lina128 lina128 merged commit 8e58af0 into master Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tf.enableDebugMode() cause an error

3 participants