Explorar el Código

use .has instead of checking against undefined

tags/v0.3.1
notme hace 5 años
committed by Big Bad Waffle
padre
commit
4de07d7f90
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. +1
    -1
      src/server/world/map.js

+ 1
- 1
src/server/world/map.js Ver fichero

@@ -206,7 +206,7 @@ module.exports = {

let data = layer.data || layer.objects;
let firstItem = data[0];
if (firstItem && typeof firstItem.width !== 'undefined') {
if (firstItem && firstItem.has('width')) {
let info = {
map: this.name,
layer: layerName,


Cargando…
Cancelar
Guardar