Please use the below code to check if the current user is the member of a group.
var web = new Web('{SiteURL}');
return web.siteGroups.getByName('{GroupName}').users.get().then(function(result) {
return pnp.sp.web.currentUser.get().then(function(currentUser){
for (var i = 0; i < result.length; i++) {
if(result[i].Email == currentUser.Email){
return '{FormSetID}';
}
}
});
}).catch(function(err) {
alert("Group not found: " + err);
});