Skip to content

Commit

Permalink
[protobuf] 手动更新协议文件时,文件路径没有后缀名的问题。
Browse files Browse the repository at this point in the history
  • Loading branch information
whtiehack committed Jan 23, 2019
1 parent 88610cf commit 401c2b3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/pinus/lib/components/protobuf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,10 @@ export class ProtobufComponent implements IComponent {
// 手动重新加载协议文件。
public manualReloadProtos() {
let truePath = path.join(this.app.getBase(), this.serverProtosPath);
truePath = require.resolve(truePath);
this.onUpdate(Constants.RESERVED.SERVER, truePath, "change");
truePath = path.join(this.app.getBase(), this.clientProtosPath);
truePath = require.resolve(truePath);
this.onUpdate(Constants.RESERVED.CLIENT, truePath, "change");
}

Expand Down

0 comments on commit 401c2b3

Please sign in to comment.