warframe-worldstate-parser 3.0.6 → 3.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -44,7 +44,7 @@ export default class News extends WorldstateObject {
44
44
  * The news's image link
45
45
  * @type {string}
46
46
  */
47
- this.imageLink = wfCdn(data.ImageUrl || cdn('img/news-placeholder.png'));
47
+ this.imageLink = data.ImageUrl ? wfCdn(data.ImageUrl) : cdn('img/news-placeholder.png');
48
48
 
49
49
  /**
50
50
  * Whether this has priority over other news or not
@@ -256,7 +256,12 @@ export default class WorldEvent extends WorldstateObject {
256
256
  * @returns {string} the event's string representation
257
257
  */
258
258
  toString() {
259
- let lines = [`${this.description} : ${this.faction}`];
259
+ let lines = [];
260
+ if (this.faction) {
261
+ lines.push(`${this.description} : ${this.faction}`);
262
+ } else {
263
+ lines.push(this.description);
264
+ }
260
265
 
261
266
  if (this.scoreLocTag && this.maximumScore) {
262
267
  lines.push(`${this.scoreLocTag} : ${this.maximumScore}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "warframe-worldstate-parser",
3
- "version": "3.0.6",
3
+ "version": "3.0.8",
4
4
  "description": "An Open parser for Warframe's Worldstate in Javascript",
5
5
  "keywords": [
6
6
  "warframe-worldstate",