File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ class SwitchbotDeviceWoCurtain extends SwitchbotDevice {
4949
5050 /* ------------------------------------------------------------------
5151 * runToPos()
52- * - run to the targe position
52+ * - run to the target position
5353 *
5454 * [Arguments]
5555 * - percent | number | Required | the percentage of target position
@@ -63,7 +63,7 @@ class SwitchbotDeviceWoCurtain extends SwitchbotDevice {
6363 return new Promise ( ( resolve , reject ) => {
6464 reject (
6565 new Error (
66- "The type of target position percentage is incorrent : " +
66+ "The type of target position percentage is incorrect : " +
6767 typeof percent
6868 )
6969 ) ;
@@ -75,7 +75,7 @@ class SwitchbotDeviceWoCurtain extends SwitchbotDevice {
7575 if ( typeof mode != "number" ) {
7676 return new Promise ( ( resolve , reject ) => {
7777 reject (
78- new Error ( "The type of running mode is incorrent : " + typeof mode )
78+ new Error ( "The type of running mode is incorrect : " + typeof mode )
7979 ) ;
8080 } ) ;
8181 }
Original file line number Diff line number Diff line change @@ -444,7 +444,7 @@ class SwitchbotDevice {
444444 this . _connect ( )
445445 . then ( ( ) => {
446446 if ( ! this . _chars ) {
447- return reject ( "No characteristics available." ) ;
447+ return reject ( new Error ( "No characteristics available." ) ) ;
448448 }
449449 return this . _write ( this . _chars . write , req_buf ) ;
450450 } )
You can’t perform that action at this time.
0 commit comments