Changeset 38766


Ignore:
Timestamp:
2024-02-22T14:53:37+13:00 (2 months ago)
Author:
kjdon
Message:

doc.shapes might not be defined

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/js/map-scripts.js

    r36027 r38766  
    495495
    496496/* Given a doc, removes all its shapes doc.shapes from the map _map */
    497 function removeMarkersFromMap(doc) {   
     497function removeMarkersFromMap(doc) {
     498    if (doc.shapes) {
    498499    for(var i = 0; i < doc.shapes.length; i++) {
    499500        var shape = doc.shapes[i];
    500501        shape.setMap(null);
    501502    }
     503    }
    502504}
    503505
Note: See TracChangeset for help on using the changeset viewer.