1
0
mirror of https://github.com/rancher/norman.git synced 2025-09-18 08:14:56 +00:00

Do not wrap a wrapped schema store

Problem:
Pagination is broken when the schema store is wrapped twice

Solution:
Do not wrap a wrapped schema store
This commit is contained in:
gitlawr
2019-04-07 08:41:18 +08:00
committed by Craig Jellick
parent 5bf0d4b458
commit f18ee0dedb
2 changed files with 56 additions and 0 deletions

View File

@@ -7,6 +7,10 @@ import (
)
func Wrap(store types.Store) types.Store {
if _, ok := store.(*StoreWrapper); ok {
return store
}
return &StoreWrapper{
store: store,
}