Skip to content

Commit

Permalink
merge: resolve conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
su-chang committed Mar 15, 2020
2 parents e1df0a4 + 2475fc8 commit c3319bf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,10 @@ jobs:
- name: Is A Publish Branch
if: steps.check-branch.outputs.match == 'true'
run: |
NAME=$(npx pkg-jq -r .name)
VERSION=$(npx pkg-jq -r .version)
if npx version-exists @chatie/grpc "$VERSION"
then "Version $VERSION exists on NPM, skipped."
if npx version-exists "$NAME" "$VERSION"
then echo "$NAME@$VERSION exists on NPM, skipped."
else npm publish
fi
env:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wechaty-puppet",
"version": "0.21.11",
"version": "0.21.12",
"description": "Abstract Puppet for Wechaty",
"main": "dist/src/index.js",
"typings": "dist/src/index.d.ts",
Expand Down
11 changes: 4 additions & 7 deletions src/puppet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -453,15 +453,12 @@ export abstract class Puppet extends EventEmitter {
*/
public abstract async logout (): Promise<void>

public selfId (): undefined | string {
public selfId (): string {
log.verbose('Puppet', 'selfId()')

/**
* Huan (202003): do not throw exception. deal `undefined` outside.
*/
// if (!this.id) {
// throw new Error('not logged in, no this.id yet.')
// }
if (!this.id) {
throw new Error('not logged in, no this.id yet.')
}

return this.id
}
Expand Down

0 comments on commit c3319bf

Please sign in to comment.