Skip to content

Commit 7a30c8f

Browse files
wip(docs): update README.md example
1 parent cbfbbc7 commit 7a30c8f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,19 @@ Load .vue files dynamically at runtime from your html/js. No node.js environment
3636
},
3737
async getFile(url) {
3838
39-
// v0.7.x
4039
const res = await fetch(url);
4140
if ( !res.ok )
4241
throw Object.assign(new Error(res.statusText + ' ' + url), { res });
43-
return await res.text();
42+
return {
43+
getContentData: asBinary => asBinary ? res.arrayBuffer() : res.text(),
44+
}
45+
4446
45-
/* v0.8.x
47+
/* v0.7.x
4648
const res = await fetch(url);
4749
if ( !res.ok )
4850
throw Object.assign(new Error(res.statusText + ' ' + url), { res });
49-
return {
50-
getContentData: asBinary => asBinary ? res.arrayBuffer() : res.text(),
51-
}
51+
return await res.text();
5252
*/
5353
},
5454
addStyle(textContent) {

0 commit comments

Comments
 (0)