From f7dc93dab194472329d74c056c4730b41e98d650 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Tue, 19 Oct 2021 13:29:49 +0200 Subject: Update to latest Brr library --- editor/state/storage.ml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'editor/state') diff --git a/editor/state/storage.ml b/editor/state/storage.ml index 4688881..a10e75f 100755 --- a/editor/state/storage.ml +++ b/editor/state/storage.ml @@ -128,14 +128,14 @@ let get_ids let storage = Storage.local G.window in let items = Storage.length storage in - let sub = Jstr.( storage_key + (v "_") ) in - let start = Jstr.length sub in + let prefix = Jstr.( storage_key + (v "_") ) in + let start = Jstr.length prefix in let rec add_element acc = function | -1 -> acc | nb -> begin match Storage.key storage nb with - | Some key when (Jstr.starts_with ~sub key) -> + | Some key when (Jstr.starts_with ~prefix key) -> let key_name = Jstr.sub key ~start in @@ -188,5 +188,3 @@ let of_json key )) result - - -- cgit v1.2.3