src/history.js
function mustPreserveItems(state) {
  let plugins = state.plugins
  if (cachedPreserveItemsPlugins != plugins) {
    cachedPreserveItems = false
    cachedPreserveItemsPlugins = plugins
    for (let i = 0; i < plugins.length; i++) if (plugins[i].spec.historyPreserveItems) {
      cachedPreserveItems = true
      break
    }
  }
  return cachedPreserveItems
}
function mustPreserveItems(state) {
  let plugins = state.plugins
  if (cachedPreserveItemsPlugins != plugins) {
    cachedPreserveItems = false
    cachedPreserveItemsPlugins = plugins
    for (let i = 0; i < plugins.length; i++) if (plugins[i].spec.historyPreserveItems) {
      cachedPreserveItems = true
      break
    }
  }
  return cachedPreserveItems
}
function mustPreserveItems ( state ) { let plugins = state . plugins if ( cachedPreserveItemsPlugins != plugins ) { cachedPreserveItems = false cachedPreserveItemsPlugins = plugins for ( let i = 0 ; i < plugins . length ; i ++ ) if ( plugins [ i ] . spec . historyPreserveItems ) { cachedPreserveItems = true break } } return cachedPreserveItems }
Check whether any plugin in the given state has a `historyPreserveItems` property in its spec, in which case we must preserve steps exactly as they came in, so that they can be rebased.
Check whether any plugin in the given state has a historyPreserveItems property in its spec in which case we must preserve steps exactly as they came in so that they can be rebased .