plugins/polling-updater.js
function updateTag(tag, tagData) {
    // if not a valid object for receiving updates, we are done
    if (! tag) return;
    // check that this is the current tag manager
    if (tagData.mac && (tag.wirelessTagManager.mac !== tagData.mac)) {
        throw new Error("expected tag " + tag.uuid
                        + " to be with tag manager " + tag.mac
                        + " but is reported to be with " + tagData.mac);
    }
    // we don't currently have anything more to do for the extra properties
    // identifying the tag manager, so simply get rid of them
    managerProps.forEach((k) => { delete tagData[k] });
    // almost done
    tag.data = tagData;
}
function updateTag(tag, tagData) {
    // if not a valid object for receiving updates, we are done
    if (! tag) return;
    // check that this is the current tag manager
    if (tagData.mac && (tag.wirelessTagManager.mac !== tagData.mac)) {
        throw new Error("expected tag " + tag.uuid
                        + " to be with tag manager " + tag.mac
                        + " but is reported to be with " + tagData.mac);
    }
    // we don't currently have anything more to do for the extra properties
    // identifying the tag manager, so simply get rid of them
    managerProps.forEach((k) => { delete tagData[k] });
    // almost done
    tag.data = tagData;
}
function updateTag ( tag , tagData ) { // if not a valid object for receiving updates, we are done if ( ! tag ) return ; // check that this is the current tag manager if ( tagData . mac && ( tag . wirelessTagManager . mac !== tagData . mac ) ) { throw new Error ( "expected tag " + tag . uuid + " to be with tag manager " + tag . mac + " but is reported to be with " + tagData . mac ) ; } // we don't currently have anything more to do for the extra properties // identifying the tag manager, so simply get rid of them managerProps . forEach ( ( k ) => { delete tagData [ k ] } ) ; // almost done tag . data = tagData ; }
Updates the tag corresponding to the given tag data. Does nothing
if the respective tag is undefined or null.

@param {WirelessTag} tag - the tag object to be updated
@param {object} tagData - the data to update the tag object with;
this is normally returned from the API endpoint

@private
Updates the tag corresponding to the given tag data . Does nothing if the respective tag is undefined or null .