Skip to content

Commit

Permalink
Fix default skin model for getRenders
Browse files Browse the repository at this point in the history
  • Loading branch information
egorprnn committed Mar 28, 2021
1 parent c61cc0d commit 4b28c8c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "namemcwrapper",
"version": "1.8.3",
"version": "1.8.4",
"description": "ES6 Promise based wrapper for NameMC.com",
"main": "./dist/NameMC.js",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion src/DataParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,8 @@ export abstract class DataParser {
switch(type) {
case "skin": {
const name = (response as ISkinResponse).name || null;
const model = (response as ISkinResponse).model || (this.options.defaultSkinsModel || "unknown");
const rating = (response as ISkinResponse).rating ?? 0;
const model = (response as ISkinResponse).model || this.options.defaultSkinsModel || "unknown";

return {
url,
Expand Down
2 changes: 0 additions & 2 deletions src/NameMC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ export class NameMC extends DataParser {
}: IGetRendersOptions): IRender {
const endpoint: string = this.getEndpoint({ subdomain: "render" });

model = model || this.options.defaultSkinsModel;

return {
body: {
front: `${endpoint}/skin/3d/body.png?skin=${skin}&model=${model}&width=${width}&height=${height}&theta=${theta}&phi=${phi}&time=${time}`,
Expand Down

0 comments on commit 4b28c8c

Please sign in to comment.