Skip to content

Commit 309d6b0

Browse files
improved search index loading, by string usage
1 parent 39b3a44 commit 309d6b0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/export/project.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ export async function exporter(argument: ProjectExportArguments, json: any) {
449449
<script>
450450
// Compact index: [{t, g, i, u, s: [[sectionTitle, sectionContent, indentation], ...]}]
451451
// Denormalize into flat records for Fuse
452-
var SEARCH_INDEX = ${JSON.stringify(searchIndex)};
452+
var SEARCH_INDEX = JSON.parse(${JSON.stringify(JSON.stringify(searchIndex))});
453453
var FLAT_INDEX = [];
454454
SEARCH_INDEX.forEach(function(course) {
455455
for (var n = 0; n < course.s.length; n++) {

0 commit comments

Comments
 (0)