File tree Expand file tree Collapse file tree 11 files changed +18
-18
lines changed
Expand file tree Collapse file tree 11 files changed +18
-18
lines changed Original file line number Diff line number Diff line change 33 "description" : " @git-diff-view/cli" ,
44 "author" : " MrWangJustToDo" ,
55 "license" : " MIT" ,
6- "version" : " 0.0.4 " ,
6+ "version" : " 0.0.5 " ,
77 "main" : " index.mjs" ,
88 "type" : " module" ,
99 "types" : " index.d.ts" ,
5050 " cli diff component"
5151 ],
5252 "dependencies" : {
53- "@git-diff-view/core" : " ^0.0.33 " ,
53+ "@git-diff-view/core" : " ^0.0.34 " ,
5454 "@types/hast" : " ^3.0.0" ,
5555 "highlight.js" : " ^11.11.0" ,
5656 "lowlight" : " ^3.3.0" ,
Original file line number Diff line number Diff line change 33 "description" : " @git-diff-view/core" ,
44 "author" : " MrWangJustToDo" ,
55 "license" : " MIT" ,
6- "version" : " 0.0.33 " ,
6+ "version" : " 0.0.34 " ,
77 "main" : " index.js" ,
88 "types" : " index.d.ts" ,
99 "files" : [
5353 " diff parse"
5454 ],
5555 "dependencies" : {
56- "@git-diff-view/lowlight" : " ^0.0.33 " ,
56+ "@git-diff-view/lowlight" : " ^0.0.34 " ,
5757 "highlight.js" : " ^11.11.0" ,
5858 "lowlight" : " ^3.3.0" ,
5959 "fast-diff" : " ^1.3.0"
Original file line number Diff line number Diff line change 33 "description" : " @git-diff-view/file" ,
44 "author" : " MrWangJustToDo" ,
55 "license" : " MIT" ,
6- "version" : " 0.0.33 " ,
6+ "version" : " 0.0.34 " ,
77 "main" : " index.js" ,
88 "types" : " index.d.ts" ,
99 "files" : [
5353 " diff parse"
5454 ],
5555 "dependencies" : {
56- "@git-diff-view/core" : " ^0.0.33 " ,
56+ "@git-diff-view/core" : " ^0.0.34 " ,
5757 "diff" : " ^8.0.2" ,
5858 "highlight.js" : " ^11.11.0" ,
5959 "lowlight" : " ^3.3.0" ,
Original file line number Diff line number Diff line change 33 "description" : " @git-diff-view/lowlight" ,
44 "author" : " MrWangJustToDo" ,
55 "license" : " MIT" ,
6- "version" : " 0.0.33 " ,
6+ "version" : " 0.0.34 " ,
77 "main" : " index.js" ,
88 "types" : " index.d.ts" ,
99 "files" : [
Original file line number Diff line number Diff line change 33 "description" : " @git-diff-view/react" ,
44 "author" : " MrWangJustToDo" ,
55 "license" : " MIT" ,
6- "version" : " 0.0.33 " ,
6+ "version" : " 0.0.34 " ,
77 "main" : " index.js" ,
88 "types" : " index.d.ts" ,
99 "files" : [
6767 " react diff component"
6868 ],
6969 "dependencies" : {
70- "@git-diff-view/core" : " ^0.0.33 " ,
70+ "@git-diff-view/core" : " ^0.0.34 " ,
7171 "@types/hast" : " ^3.0.0" ,
7272 "fast-diff" : " ^1.3.0" ,
7373 "highlight.js" : " ^11.11.0" ,
Original file line number Diff line number Diff line change 33 "description" : " @git-diff-view/shiki" ,
44 "author" : " MrWangJustToDo" ,
55 "license" : " MIT" ,
6- "version" : " 0.0.33 " ,
6+ "version" : " 0.0.34 " ,
77 "types" : " index.d.ts" ,
88 "main" : " ./dist/esm/index.mjs" ,
99 "type" : " module" ,
Original file line number Diff line number Diff line change 33 "description" : " @git-diff-view/solid" ,
44 "author" : " MrWangJustToDo" ,
55 "license" : " MIT" ,
6- "version" : " 0.0.6 " ,
6+ "version" : " 0.0.7 " ,
77 "main" : " ./dist/solid-git-diff-view.mjs" ,
88 "type" : " module" ,
99 "types" : " index.d.ts" ,
4141 " solid diff component"
4242 ],
4343 "dependencies" : {
44- "@git-diff-view/core" : " ^0.0.33 " ,
44+ "@git-diff-view/core" : " ^0.0.34 " ,
4545 "@types/hast" : " ^3.0.0" ,
4646 "highlight.js" : " ^11.11.0" ,
4747 "lowlight" : " ^3.3.0" ,
Original file line number Diff line number Diff line change 3737 "./package.json" : " ./package.json"
3838 },
3939 "dependencies" : {
40- "@git-diff-view/core" : " ^0.0.33 " ,
40+ "@git-diff-view/core" : " ^0.0.34 " ,
4141 "@types/hast" : " ^3.0.0" ,
4242 "highlight.js" : " ^11.11.0" ,
4343 "lowlight" : " ^3.3.0" ,
Original file line number Diff line number Diff line change 33 "description" : " @git-diff-view/utils" ,
44 "author" : " MrWangJustToDo" ,
55 "license" : " MIT" ,
6- "version" : " 0.0.33 " ,
6+ "version" : " 0.0.34 " ,
77 "types" : " index.d.ts" ,
88 "type" : " module" ,
99 "files" : [
Original file line number Diff line number Diff line change @@ -46,8 +46,8 @@ export const getDiffIdFromElement = (element?: HTMLElement) => {
4646 if ( element ) {
4747 if ( typeof element . closest === "function" ) {
4848 const diffRoot = element . closest ( '[data-component="git-diff-view"]' ) ;
49- const ele = diffRoot . querySelector ( ".diff-view-wrapper" ) ;
50- return ele . getAttribute ( "id" ) ;
49+ const ele = diffRoot ? .querySelector ?. ( ".diff-view-wrapper" ) ;
50+ return ele ? .getAttribute ?. ( "id" ) ;
5151 } else {
5252 let el : HTMLElement | null = element ;
5353 while ( el ) {
You can’t perform that action at this time.
0 commit comments