diff --git a/src/proto.ts b/src/proto.ts index 3eba5ca..3a81424 100644 --- a/src/proto.ts +++ b/src/proto.ts @@ -98,7 +98,7 @@ export function jsonTemplate(message: protobuf.Type): any { // Returns obj.fullName without the first period. export function fullName(obj: protobuf.ReflectionObject) { - return obj.fullName[0] === '.' ? obj.fullName.substr(1) : obj.fullName; + return obj.fullName[0] === '.' ? obj.fullName.slice(1) : obj.fullName; } export const typeName = (obj: protobuf.ReflectionObject): string => {