File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed
Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -49,22 +49,18 @@ function shouldPrintComma(options, level) {
4949 }
5050}
5151
52- function hasPrettierIgnoreComment ( node ) {
53- return (
54- node &&
55- node . comments &&
56- node . comments . length > 0 &&
57- node . comments . some ( comment => comment . value . trim ( ) === "prettier-ignore" )
58- ) ;
59- }
60-
6152function genericPrint ( path , options , printPath , args ) {
6253 assert . ok ( path instanceof FastPath ) ;
6354
6455 var node = path . getValue ( ) ;
6556
6657 // Escape hatch
67- if ( hasPrettierIgnoreComment ( node ) ) {
58+ if (
59+ node &&
60+ node . comments &&
61+ node . comments . length > 0 &&
62+ node . comments . some ( comment => comment . value . trim ( ) === "prettier-ignore" )
63+ ) {
6864 return options . originalText . slice ( util . locStart ( node ) , util . locEnd ( node ) ) ;
6965 }
7066
You can’t perform that action at this time.
0 commit comments