MCPcopy Create free account
hub / github.com/codecombat/codecombat / updateHash

Method updateHash

app/views/common/SearchView.js:116–120  ·  view source on GitHub ↗
(term)

Source from the content-addressed store, hash-verified

114 }
115
116 updateHash (term) {
117 const newPath = document.location.pathname + (term ? '#' + term : '')
118 const currentPath = document.location.pathname + document.location.hash
119 if (newPath !== currentPath) { return application.router.navigate(newPath) }
120 }
121
122 sameSearch (term) {
123 if (!this.collection) { return false }

Callers 1

runSearchMethod · 0.95

Calls 1

navigateMethod · 0.80

Tested by

no test coverage detected